sonal
sonal

Reputation: 31

Assembly in asp.net

I'm having one assembly.I need to use that assembly in my application.i dont want to give reference to that assembly and not GAC also.

How to use that assembly in my application?

Upvotes: 3

Views: 93

Answers (2)

Pranay Rana
Pranay Rana

Reputation: 176886

Make use of reflection and load assembly dynamically tha you can call the methods of it.

here is one example of it

Assembly assembly = Assembly.LoadFrom("MyNice.dll");

Type type = assembly.GetType("MyType");

object instanceOfMyType = Activator.CreateInstance(type);

Dynamically Loading an assembly at Runtime and calling its methods

Upvotes: 3

Jagmag
Jagmag

Reputation: 10356

One option is to use reflection

You can refer to this link for more details as to possible implementation

http://www.codeproject.com/KB/cs/csharpreflection.aspx

Upvotes: 2

Related Questions