Hi
I need to reference a .net .dll file at runtime of my program.
Does anyone know the code to do it?

Recommended Answers

All 3 Replies

Use System.Reflection.Assembly.LoadFile("C:\assembly.dll")

Hello
How can I use the stuff from the dll as if it was referenced normally?

Basically you would have to DllImport all of the method signatures you intend to call. What are you trying to do? DLLs aren't loaded by an application until you reference a class dependent on that library any way. This sounds like a rather odd question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.