My application uses reflection to parse C ++ / cli code at runtime.
I need to determine if the type has a constructor without unmanaged parameters (pointers, etc.), because I want to use later:
ConstructorInfo constructorInfo; // ... var ret = constructorInfo.Invoke(BindingFlags..., null, myParameters, null);
If the constructor has a pointer to an unmanaged object as a parameter, a cast exception is thrown when I pass it null.
So how do I define this? no IsManaged ... and IsPointer will not help in this case.
source share