Problem in using Assembly CreateInstance



Is ManWrapper in a namespace? You need to use the fully qualified name of the type.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi,

I want to create an Instance of Class using Assembly.CreateInstance
method. I have loaded my assmbly

Assembly exeAssmb = Assembly.LoadWithPartialName"CommonStructures");
//Assembly exeAssmb =
Assembly.LoadFrom("C:\\Inetpub\\wwwroot\\Vinoth\\CommonStructures.dll");


Then when i create an Instance of the Assembly it giving Undefined
Value.
string instClass = "ManWrapper";
object inst =exeAssmb.CreateInstance(instClass);
//object inst =Activator.CreateInstance(exeAssmb.FullName,instClass);

This class(ManWrapper) is in CommonStructures and i registered it in
gacutil also.

I tried the Commentd line also. What is the problem? Is anybody knows
solution please let me know.

Thanks,
Vinoth


[microsoft.public.dotnet.languages.csharp]
.



Relevant Pages

  • How to get information from a web site by using C# in a windows application?
    ... Take a look art the System.Net.HttpWebRequest class and, if the site has an RSS feed, the System.Xml namespace ... Regards ... Richard Blewett - DevelopMentor ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Hi
    ... Regards ... Richard Blewett - DevelopMentor ... Checked by AVG anti-virus system. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Combo box refresh
    ... >> Richard Blewett - DevelopMentor ... In PopulateDatasetList how is this populating the combobox? ... Regards ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: passing parameter to thread ??
    ... Diving in before Jon does;-) ... Regards ... Richard Blewett - DevelopMentor ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Strong name trouble
    ... > Richard Blewett - DevelopMentor ... >> My code DOES NOT WORK if assemblies ARE strong name. ...
    (microsoft.public.dotnet.languages.csharp)