Quick question: how to compare a Type type (pun not intended) with another type in C#? I mean, I\'ve a Type typeField and I want to know if it is System.S
Type typeField
System.S
http://msdn.microsoft.com/en-us/library/system.type.gettype.aspx
Console.WriteLine("typeField is a {0}", typeField.GetType());
which would give you something like
typeField is a String typeField is a DateTime
or
http://msdn.microsoft.com/en-us/library/58918ffs(v=vs.71).aspx