Dinusha Dinusha - 3 months ago 15
C# Question

how to call dll file without using statment in c#

How do I call a DLL written in C#, from my C# main project without using the

using statement
?

As in
CreateObject(servername.typename[,location])
in VB.

Answer

The closest methods in the .Net framework equivalent to VB6's CreateObject call are the following:

object calcInstance = Activator.CreateInstance(calcType);
or    
Assembly testAssembly = Assembly.LoadFile(@"c:\Test.dll");

Code taken from http://www.csharp-examples.net/reflection-examples/