Christian Nagel shows us another neat trick we can expect out of C# generics:
public delegate void EventHander<S, T>(S sender, T args) where T : EventArgs;
also shows a big difference to the template implementation of C++. With C# generics it is possible to define requirements of generic types, such as T needs _place_holder;to be of type of _place_holder;EventArgs (or derived from this class). _place_holder;With C++ templates we just find out that a type doesn’t fulfill the requirements when compiling the template using the specific type. Often the compiler error messages with many, many lines are not easy to read.
Very nice. I was an STL junkie I remember all the nasty errors produced by the compiler when you did something wrong. I really like the way that reads too.