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)); }
public static string doSomething(this bar b) { return(b.result); }