[Mono-list] A bug in .NET miising in mono?

Raitskin Alexandr alexrait1 at mail.ru
Fri Jan 13 01:34:29 EST 2006


Fredrik Elestedt wrote:

> Are your really trying to have a namespace inherit a class? Didn't think
> that would work
>
> // Fredrik
>
> Raitskin Alexandr wrote:
>   
>> I really don't know if it's a bug or not.. but still that seems a bit
>> weird:
>>
>> Look at the following configuration:
>>
>> I have two simple dlls and one main application
>>
>>
>> Dll 1:
>>
>> namespace baseDll{
>>
>>    public class baseClass{}
>>
>> }
>>
>>
>> Dll 2:
>>
>> using baseDll;
>>
>> namespace childClass:baseClass{
>>
>>    public class childClass{}
>>
>> }
>>
>>
>> App:
>>
>> Assembly a1 = Assembly.LoadFile("@c:\childDll.dll);
>>
>> Assembly a2 = Assembly.LoadFile("@c:\baseDll.dll);
>>
>>
>> System.Type t1 = a1.GetType("childDll.childClass");
>>
>> if (t1 != null) Console.WriteLine("OK");
>>
>>
>> It never wirtes OK on .NET 1.14..
>>
>> moreover when I use a1.GetTypes() it throws an exception..
>>
>>
>> Well, guess what.. mono doesn't have these problems...
>>
>> either I am doing something really wrong.. or it's a feature, or I don't
>> know what to think.
>>
>>
>> Besides if I do Assembly.LoadFrom and not LoadFile it works ok...
>>
>>
>> any explanation for this?
>>
>>
>> thanx.
>>
>> Alex R.
>>
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>     
>
>
>   
Of course I mean this:

Dll 2:

using baseDll;

namespace childDll{

   public class childClass:baseClass{}

}


By the I've found this:
http://blogs.msdn.com/suzcook/archive/2003/09/19/57248.aspx

and I wonder if mono developers took into account these 
differences...between loadFile and loadFrom.. since indeed, loadFile 
shouldn't work


More information about the Mono-list mailing list