I can\'t understand why the following C# code doesn\'t compile.
As you can see, I have a static generic method Something with an IEnumerable parame
IEnumerable
I just wanted to complement Eric's excellent insider answer with a code example for those that may not be that familiar with generic constraints.
Change Something's signature like this: The class constraint has to come first.
Something
class
public static IList Something(IEnumerable foo) where T : class, IA