One thing I learned today

Today I learned how to retrieve the default value of a parameterized type T in a generic type definition in C#. The issue is that one does not know in advanced if T is a reference type or value type. And if it is a value type if it is a struct or not. So when you need to get the default value of T use the following construct:

T someVar = default(T);

You can find more detailed info about the default keyword here.