Z
zdbdam
Guest
I tried to use following code to get "System.Decimal" but I received this undesirable exception!
decimal? x = null;
Console.WriteLine(x.GetType()); //I will get an NullReferenceException.
maybe one solution is:
decimal? x = null;
Console.WriteLine(x.GetValueOrDefault().GetType())
but i presume there is a better way.
Continue reading...
decimal? x = null;
Console.WriteLine(x.GetType()); //I will get an NullReferenceException.
maybe one solution is:
decimal? x = null;
Console.WriteLine(x.GetValueOrDefault().GetType())
but i presume there is a better way.
Continue reading...