Is it possible to define a class in C# such that
class GenericCollection : SomeBaseCollection where T : Delegate
I couldn
Edit: Some proposed work-arounds are proposed in these articles:
http://jacobcarpenters.blogspot.com/2006/06/c-30-and-delegate-conversion.html
http://jacobcarpenters.blogspot.com/2006_11_01_archive.html
From the C# 2.0 specification we can read (20.7, Constraints):
A class-type constraint must satisfy the following rules:
And sure enough VS2008 spits out an error:
error CS0702: Constraint cannot be special class 'System.Delegate'
For info and investigation on this issue read here.