J
Jimi
How would I go about finding all structs in a framework assembly?
Assembly asm = Assembly.LoadWithPartialName(sSystemAssembly);
foreach (System.Type asmType in asm.GetExportedTypes())
{
if (asmType.IsValueType && asmType.IsSealed && !
asmType.IsEnum)
...
This just gets messy - I know there's an "IsClass" property on the
System.Type object, I thought there would logically be a "IsStruct",
but no luck. Is there a reliable method of getting structs?
Assembly asm = Assembly.LoadWithPartialName(sSystemAssembly);
foreach (System.Type asmType in asm.GetExportedTypes())
{
if (asmType.IsValueType && asmType.IsSealed && !
asmType.IsEnum)
...
This just gets messy - I know there's an "IsClass" property on the
System.Type object, I thought there would logically be a "IsStruct",
but no luck. Is there a reliable method of getting structs?