static void Foo <T>(T value) { ObjectComparer <T> comparer = new ObjectComparer <T>(); comparer.Bar(value); }