In this lesson we will learn more about Methods. We will learn how to use some maths methods like Sin, Cos, Tan, Round, Pow and Sqrt. We will also learn how to split string in C#.Topics covered:
Topics covered:
- Maths functions: Sin(), Cos(), Tan(), Round(), Pow(), Sqrt()
- string Split()
static void Main(){ // Call Maths functions by Maths library name, like this: Maths.Cos() Maths.Sqrt() }
static void Main(){ string s1 = "Hello world!"; string[] substring = s1.Split(' '); foreach (string part in substring){ Console.WriteLine(part); } }