예제 #1
0
        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();
        }
예제 #2
0
 public static void MethodThree(this OldClass O)
 {
     Console.WriteLine("Method Three");
 }
예제 #3
0
 public static void MethodFive(this OldClass O)
 {
     Console.WriteLine("Method Five:" + O.x);
 }
예제 #4
0
 public static void MethodFour(this OldClass O, int x)
 {
     Console.WriteLine("Method Four: " + x);
 }