Closed sflanker closed 7 years ago
By design and/or a limitation (feature?) of the .Net framework. When Nullable structs are cast to Object (boxed) they type information (fact that they were Nullable) is lost and they are just stored as either a box integer or a null. Even this Int32? foo = 1; Console.WriteLine(foo.GetType().FullName));
displays "System.Int32" because calling GetType
requires the struct to be boxed.
Given this test:
The following test failure occurs: