using System; public class Bar { public int Z {get;set;} } public class Foo { public T Test {get;set;} public int Z (Bar t) { return t.Z; } } public struct Cat { T t; public void Test () { Console.WriteLine (GetType ()); } } class Driver { static void Main () { Cat c = new Cat (); c.Test (); new Foo ().Z(new Bar()); } }