Suppose I have a generic method:
T Foo(T x) {
return x;
}
So far so good. But I want to do something special if it\'s a Hashtable. (I
"The C# compiler only lets you implicitly cast generic type parameters to Object, or to constraint-specified types, as shown in Code block 5. Such implicit casting is type safe because any incompatibility is discovered at compile-time."
See the section on Generics and Casting: http://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).aspx#csharp_generics_topic5