System.Activator.CreateInstance failed on internal class in the same assembly. 
Author Message
 System.Activator.CreateInstance failed on internal class in the same assembly.

Is it correct that System.Activator.CreateInstance cannot create a instance
of a class in the same assembly of the caller of
System.Activator.CreateInstance if the default constructor is marked
internal ?

Lionel Schiepers.



Tue, 01 Mar 2005 22:32:23 GMT  
 System.Activator.CreateInstance failed on internal class in the same assembly.
you should specify namespace as well. my code do it this way:

ObjectHandle hRenderer = Activator.CreateInstance( sAssembly, sNamespace +
"." + sClass );

ps. you always can get the assembly name via
Assembly.GetExecutingAssembly().GetName().Name

good luck,

YZ.


Quote:
> Is it correct that System.Activator.CreateInstance cannot create a
instance
> of a class in the same assembly of the caller of
> System.Activator.CreateInstance if the default constructor is marked
> internal ?

> Lionel Schiepers.



Wed, 02 Mar 2005 00:31:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. System.Activator.CreateInstance() - evidence?

2. System::Activator::CreateInstance?

3. Unhandled Exception: System.Configuration.ConfigurationException: Could not create System Configuration.NameValueSectionHandler, System

4. System.Drawing.SafeNativeMethods.GdipCreateFontFromLogfont fails

5. System.InvalidOperationException: Failed to add the panel to the native status bar control

6. Binary Serialization of classes inherite from System.ComponentModel.Component

7. System.Windows.Forms.Application in Class lib

8. System.ServiceProcess.ServiceInstaller class and services

9. Using efficiently System.drawing.design.imageEditor class

10. ? HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_

11. System.Runtime.InteropServices.VTableCallsNotSupportedException

12. bufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbuf

 

 
Powered by phpBB® Forum Software