I want to understand usage of Nullable.GetUnderlyingType(). When should it be used?
Also, in the following example, How can we make use of GetUnderlyingType instead of GetType
int? x = 1;
Console.WriteLine(x.GetType().Name);
I tried to follow Whats the use of Nullable.GetUnderlyingType, if typeof(int?) is an Int32? link, but kept my head scratching.