typeof and GetType are not the same for nullable types
After years of not writing code that runs in production I'm just delighted to find out nifty things about the framework. Here is a piece of code:
1: public static string Format<T>(T value)
2: { 3: Type t1 = typeof(T);
4: Type t2 = value.GetType();
5: }
t1 != t2 when it comes to nullable tyeps. if you fall Format with a nullable tyep of int? t1 will be int? and t2 would be a simple int. anyone knows why?