Arbitrary Restrictions On C# Generic Constraints
I’m really feeling the pain of the simplicity of C#’s generics system. I have found some situations where I could introduce more type safety by being able to refer to a type parameter on the left hand side of a generic constraint which is not a parameter of the immediate definition, but rather that of an enclosing class. For an example of what I mean, see this:
Alas, in their wisdom Microsoft have decided this is too advanced a feature for the unwashed masses to get their hands on, so I will have to struggle forward with runtime checks..