[Mono-list] Re: IsSubclassOf and Assembly.LoadFrom problem
Colin JN Breame
colin at breame.net
Fri Jan 6 08:54:55 EST 2006
On Thursday 05 January 2006 13:17, Robert Jordan wrote:
>
> You have to use typeof(a.a).IsAssignableFrom () instead:
Looks good and works perfectly. Thanks.
> > namespace test {
> > public class test {
> > public static void Main() {
> > Assembly a = Assembly.LoadFrom("b.dll");
> >
> > Type[] types = a.GetTypes();
> > foreach (Type t in types) {
>
> if (typeof(a.a).IsAssignableFrom(t))
> Console.WriteLine("{0} is a subclass of {1}", t,
> typeof(a.a));
> else
> Console.WriteLine("{0} is not a subclass of {1}", t,
> typeof(a.a));
>
> > }
> > }
> > }
> > }
>
> Robert
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list