Overload resolution issue for generic method with constraints
Does compiler take into account type parameter constraints at all, when resolving overloads? No, because generic constraints are not part of the function signature. You can verify this by adding a Bar overload that is identical except for the generic constraints: interface IBar { } static void Bar<T>(IEnumerable<T> value) where T : IFoo { } … Read more