static void Main(string[] args)
        {
            MathOps m = new MathOps();

            Console.WriteLine($"Add = {m.Add(30,40)}");
            Console.WriteLine($"Mult = {m.Mult(30, 40)}");

            Console.WriteLine($"Add = {m.AddSquare(30, 40)}");
            Console.WriteLine($"Mult = {m.MultSquare(30, 40)}");

            string str = "James Bond";

            Console.WriteLine($"Length of {str} = {str.Length}");

            Console.WriteLine($"Reverse of {str} = {str.ExtReverse()}");

            Console.ReadLine();
        }
Beispiel #2
0
 public static int MultSquare(this MathOps m, int x, int y)
 {
     return((x * x) * (y * y));
 }
Beispiel #3
0
 public static int AddSquare(this MathOps m, int x, int y)
 {
     return((x * x) + (y * y));
 }