static void Main(string[] args) { OldClass obj1 = new OldClass(); obj1.MethodOne(); obj1.MethodTwo(); obj1.MethodThree(); obj1.MethodFour(10); obj1.MethodFive(); string str = "AbCdEfGhIjK"; Console.WriteLine("String is : {0}", str); Console.WriteLine(str.ToSimpleCapital()); Console.ReadLine(); }
public static void MethodThree(this OldClass O) { Console.WriteLine("Method Three"); }
public static void MethodFive(this OldClass O) { Console.WriteLine("Method Five:" + O.x); }
public static void MethodFour(this OldClass O, int x) { Console.WriteLine("Method Four: " + x); }