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
You can use for it the is operator. You can then check if object is specific type by writing:
is
if (myObject is string) { DoSomething() }