Julia,
The closest you can come to this would be to call the static
LoadWithPartialName method on the Assembly class, and make sure that the
assembly is loaded in the GAC. In this case, you could do something like:
// Get System.Data.dll.
Assembly a = Assembly.LoadWithPartialName("System.Data");
However, AFAIK, you can't set an alias up.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Julia" <co********@012.net.il> wrote in message
news:Og**************@TK2MSFTNGP15.phx.gbl...
Hi,
My host application loading plugins at runtime
How can I dynamically load types from a dll without
specify the name of the dll in my application or in a config file
can I give a dll an alias?
assuming i have two implemnatations of a messaging service(only one should
be installed)
1.smtp.dll
2.exchange.dll
insetad of
LoadType("smtp.dll")
I would like to write
LoadType("Messaging")
when installing the exchange.dll i will still uses
LoadType("Messaging")
Thanks.
BTW:I do specify the type of object to create in the app.config.