G
Guest
Wierd stuff. Anyone seen this?
I load an assembly using Reflection (Assembly.LoadFrom), loop through public
classes in it and look at the class attributes (Type.GetCustomAttributes).
The loaded assembly contains a class which is annotated with my custom
attribute (which is referenced from another assembly) and this is returned.
The problem is that I can't cast the object returned by GetCustomAttributes
to my custom attribute even though the type name of the returned object is
the same as the type name of my custom attribute. "is" and "as" operators
both fail. Why is this?
Tried on both .NET 1.1 and 2.0b2. Same result.
TIA
Tim
I load an assembly using Reflection (Assembly.LoadFrom), loop through public
classes in it and look at the class attributes (Type.GetCustomAttributes).
The loaded assembly contains a class which is annotated with my custom
attribute (which is referenced from another assembly) and this is returned.
The problem is that I can't cast the object returned by GetCustomAttributes
to my custom attribute even though the type name of the returned object is
the same as the type name of my custom attribute. "is" and "as" operators
both fail. Why is this?
Tried on both .NET 1.1 and 2.0b2. Same result.
TIA
Tim