Reflection, has IsClass, but no IsStruct?

How to check if a type is a structure? IsClass worked perfectly, then my reflection stopped behaving as I expected when I change the class to structure. How to check if its structure? -edit- I need to check the class / structures. Nothing else, I can not cope with long, ints, etc. By chance. DateTime might be fine, I use this to search for an attribute / type of a field inside the type that I am checking

+3
reflection
source share
1 answer

Type.IsValueType should do the trick.

+10
source share

All Articles