S
Suresh
Hi,
I have an C# CSEXE.exe (CSexe.cs) and a CSDll.dll
(CSdll.cs). exe is compiled with a reference to dll.
Calling for the class Type defined in CSDLL.dll using
Type.GetType( "myDLLnamespace.CSDll" ) returns null. I
made sure that the fully qualified class defined in the
dll is case-sensitive.
// CSEXE.exe
// CSexe.cs
namespace myEXEnamespace {
public class CSexe {
public static main()
{
//This returns null
Type csdllType = Type.GetType
( "myDLLnamespace.CSdll" );
}
}
}
namespace myDLLnamespace {
public class CSdll {
public CSdll(){}
public int myFunc(int a)
{
return a*a;
}
}
}
Can anyone tell why does the Type.GetType() returns null.
I have even checked the assemblies in the current domain
by using Thread.GetDomain().GetAssemblies(), I could find
the CSDll.dll loaded in the Default appdomain. Is it a
bug in C# or am I missing something.
Thanks
Suresh
I have an C# CSEXE.exe (CSexe.cs) and a CSDll.dll
(CSdll.cs). exe is compiled with a reference to dll.
Calling for the class Type defined in CSDLL.dll using
Type.GetType( "myDLLnamespace.CSDll" ) returns null. I
made sure that the fully qualified class defined in the
dll is case-sensitive.
// CSEXE.exe
// CSexe.cs
namespace myEXEnamespace {
public class CSexe {
public static main()
{
//This returns null
Type csdllType = Type.GetType
( "myDLLnamespace.CSdll" );
}
}
}
namespace myDLLnamespace {
public class CSdll {
public CSdll(){}
public int myFunc(int a)
{
return a*a;
}
}
}
Can anyone tell why does the Type.GetType() returns null.
I have even checked the assemblies in the current domain
by using Thread.GetDomain().GetAssemblies(), I could find
the CSDll.dll loaded in the Default appdomain. Is it a
bug in C# or am I missing something.
Thanks
Suresh