Activity overview
Latest activity by CodeJingle
After digging for another hour I finally figured out at least one way to do it [image] . Funny enough figuring this out required opening Reflector in Reflector. So it turns out that each of the Generic arguments is of a derived IType interface type, and guessing ad-hoc which derived interface type it is and moving on from there works just fine (however inefficient that way of doing it may be). A Generic argument IType is always implementing one of these interfaces (all derived from IType): IArrayType
IDefaultConstructorConstraint
IFunctionPointer
IGenericArgument
IOptionalModifier
IPointerType
IReferenceType
IReferenceTypeConstraint
IRequiredModifier
ITypeReference
IValueTypeConstraint
Use the 'as' construct or something similar to attempt casting to each type: IType argument;
IArrayType arrayTypeArgument = argument as IArrayType;
If it fails the derived instance will be null so try to cast to next derived interface, otherwise if it is successful you found the right type. The Generic argument will always derive from one of the above interface types (and not more than one of the above). / comments
After digging for another hour I finally figured out at least one way to do it . Funny enough figuring this out required opening Reflector in Reflector. So it turns out that each of the Generic...
How to get Namespace of GenericArguments?
Hello. When I enumerate the GenericArguments of a type I don't seem to have access to the namespace string. How do I get the namespace string of the generic arguments? Here is the code I wrote a...