Assembly.LoadFrom & CreateInstance problem with custom class

  • Thread starter Thread starter Bülent Üstün
  • Start date Start date
B

Bülent Üstün

Hi, i've a DLL file which contains a class i wrote named up2date (its not
windows.forms).
Which contains a constructor
public up2date(string url,string domain)

Now i want to load this DLL & use that class.
I load the assembly with
Assembly i = Assembly.LoadFrom( "update.dll" );

When i used

i.CreateInstance("up2date.up2date(\"http://mute.no-ip.com/phpupdate/\",\"up2
date\")");
it didnt work.

So i tried
Activator.CreateInstance( "update.dll" , "up2date" , new object[] {
"http://mute.no-ip.com/phpupdate/","up2date" } );


But this time it gives a Type unknown or file not found error.
What must be the type of custom classes? Or anyone have any solution to use
that class?
Any help would be appreciated.
Thanks
 
Thanks for your reply. But that doesnt work either.

iletide sunu yazdi said:
When i used

i.CreateInstance("up2date.up2date(\"http://mute.no-ip.com/phpupdate/\",\"up
2
date\")");
it didnt work.

Try

i.CreateInstance("up2date", false, 0, null, new object[]
{"http://mute.no-ip.com/phpupdate/","up2date"}, null, null);

So i tried
Activator.CreateInstance( "update.dll" , "up2date" , } );

or use Activator.CreateInstanceFrom



Mattias
 
Back
Top