[Mono-devel-list] some strangeness with CustomAttributes
mathpup at mylinuxisp.com
Fri Aug 27 19:50:43 EDT 2004
I'm not positive that I understand the second situation fully, but it sounds
as though you are comparing a type in an external assembly against a type in
the current assembly, but the current assembly does not link against the
external one. In that case, I believe that the types are going to compare
different. Two types with the same name and structure but in separate
assemblies will compare different if they're both loaded from disk.
Again, I might be off-base as far as the situation goes.
On Friday 27 August 2004 3:57 am, Jonathan Stowe wrote:
> What is even stranger is if I do:
> using System;
> using System.Reflection;
> public class Test
> public static void Main()
> Assembly a = Assembly.LoadWithPartialName("Linux.User");
> object o = a.GetCustomAttributes(true);
> foreach (object x in a.GetCustomAttributes(true))
> The type of the attribute is printed out alongside all of the other ones
> but I am unable to do a comparison against it's type (except by
> comparing the type name). I guess I am missing the point here or
> something, but can someone explain what is going on?
More information about the Mono-devel-list