Identifying DLL Methods in C #

After someone creates a DLL in C # using the Microsoft Visual development environment, how does another programmer take this code, create a new project that includes the source of the DLL, and create a GUI that uses the DLL API?

I have already completed the following four steps:

1) In Solution Explorer, right-click "Links" and select "Add Link ...".

2) Select the "Overview" tab.

3) Go to the DLL and select it.

4) Add the appropriate "using" directive to the beginning of the code.

What's next? After I declare a new object, how do I know which methods to use?

+4
source share
6 answers

Browse menu → Object Browser

You should be able to view objects / methods, etc. contained in a DLL and publicly open.

+9
source

You should be able to use intellisense and object explorer, as always. Without a source that would be your best bet.

+1
source

I don't have the code above, but have you studied the Reflection library? You should be able to figure out and run everything you need with this ...

+1
source

you can load the DLL through the .NET Reflector tool from red-gate and see all the api and even how it was implemented http://www.red-gate.com/products/reflector/

+1
source

Well...

Suppose your library is called MyLib.DLL

You would do:

MyLib ml = new MyLib(); ml.YourMethodsShouldAppearHere(); //If they are public of course. 

;)

0
source

You can open any .NET DLL in this third-party tool called " .NET Reflector ". This tool allows you to view all types / methods / properties and even decompile the code contained in the DLL.

The .NET Reflector is similar to the Object Browser in Visual Studio, but is more powerful.

If you have not tried Reflector, I highly recommend it (it is very easy to use)!

0
source

All Articles