示例#1
0
            static void Main(string[] args)
            {
                ExtensionSample kyle = new ExtensionSample();

                kyle.M1();
                kyle.M2();
                kyle.M3();
                kyle.M4();
                kyle.M5("This is method 5");
            }
示例#2
0
 public static void M5(this ExtensionSample kyle, string str)
 {
     Console.WriteLine(str);
 }
示例#3
0
 public static void M4(this ExtensionSample kyle)
 {
     Console.WriteLine("Method Name: M4");
 }