コード例 #1
0
        public void InterfaceTest()
        {
            bar x = new bar {
                result = "Hi bar it's "
            };
            bar2 xx = new bar2 {
                beforeResult = DateTime.Now
            };

            Console.WriteLine(Method(x));
            Console.WriteLine(Method(xx));
        }
コード例 #2
0
 public static string doSomething(this bar b)
 {
     return(b.result);
 }