[Mono-list] Another reflection issue

John Barnette jbarn@httcb.net
Tue, 8 Jan 2002 16:20:54 -0700


> > Anybody have a clue why this:
> > 
> > 	private static string GetKind(Type t)
> > 	{
> >       // ...
> > 	}
> 
> Try changing it to:
> 
> 	if (t.IsValueType){
> 		if (t.BaseType.FullName == "System.Enum")
> 			...
> 
> The compiler has a similar issue, because testing for something is done
> against a type loaded from an assembly, which might not be the same type
> the runtime has.

Yeah, that works.  Thanks!


~ j.