generic NOT constraint where T : !IEnumerable

Cel picture Cel · Jan 4, 2012 · Viewed 15.4k times · Source

As per the title, is it possible to declare type-negating constraints in c# 4 ?

Answer

Jon Skeet picture Jon Skeet · Jan 4, 2012

No - there's no such concept either in C# or in the CLR.