[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    Re: [Mono-devel-list] some strangeness with  CustomAttributes
From:       Marcus <mathpup () mylinuxisp ! com>
Date:       2004-08-27 23:50:43
Message-ID: 200408271850.43381.mathpup () mylinuxisp ! com
[Download RAW message or body]

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))
>       {
>          Console.WriteLine(x.GetType());
>       }
>    }
> }
>
> 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?

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic