I am using Fieldinfo.FieldType.FullName to get the field datatype.
For a string i get System.String
but for a Double i get
System.Nullable`1[[System.Double, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
similarly for DateTime i get
System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
i need to check in my code if this particular field is a datetime then do certain action.
How can i check that the field is a double or string or double etc
Thanks in advance
JaredPar’s answer is a nice explanation. For a solution, try:
Now you can just say:
etc. This code will basically “undo” the nullable type semantics.