using System; class A { } class B { static void M1 (T t) where T : struct { } static void M2 (T t, U u) where U : IEquatable { } static void M3 (T t, A u) where U : IEquatable { } static void M4 (T t, IEquatable u) where T : IEquatable { } public static void Main () { dynamic d = 2; M1 (d); M2 (d, 6); M2 (4, d); M3 (d, new A ()); M4 (d, 6); // TODO: type inference //M4 (4, d); } }