Zebra0.com

csharp functionsFunctions in C#

Functions in C#

Learn C# (C sharp) in FREE step-by-step lessons.

Module 06: Functions in C#

C# has a number of builtin functions.
This lesson includes some of the most commonly used functions.


Goals:

Objectives:

Please study the material at each of the links below.

  1. Microsoft Reference Microsoft Reference: C# Math Functions
  2. Math Functions: C# has a number of built-in functions and constants that you can use.
  3. Demonstration of Math Functions Demonstration of Math Functions: Shows how math functions might be used
  4. Drill on Math Functions Ceiling, Floor, and Round Drill on Math Functions Ceiling, Floor, and Round: Check your understanding of these functions
  5. ToString function instead of + to concatenate ToString function instead of + to concatenate: Compares using + and ToString()
  6. Parse: Convert text to Double Parse: Convert text to Double: A user does not always type a numeric value in text box, parse to get numeric value
  7. TryParse: Convert text to Double if Numeric TryParse: Convert text to Double if Numeric: TryParse to handle numeric error
  8. Ceiling: How many busses?: Real world problem to solve
  9. Random Numbers: Code to declare and use a random number
  10. Circle: Write a function to find area Circle: Write a function to find area: A function receives the radius and returns the area
  11. A Function to Generate Random Colors A Function to Generate Random Colors: A function to return a random color using Color.FromArgb(red, green, blue);
  12. BMI: A Void Function to calculate Body Mass Index BMI: A Void Function to calculate Body Mass Index: A void function does not return a value
GlossaryGlossary for functions lesson
Full Glossary