Link DLL in C# !!!

  • Thread starter Thread starter Eric Chow
  • Start date Start date
E

Eric Chow

Hello,

If I compiled a DLL in C# (csc /t:library mylib.cs);

How can I use some Class that loacates in the mylib.dll in another C#
program ????

Eric
 
Right-click on referecnes under your project name in the solution explorer
and select add. Then find the DLL in the dialgoue that's shown.

Now you can reference classes in your other C# program, either with the
fully qualified name, or with the help of a using directive.
 
If you are compiling from the command line, you should add a reference to
your assembly like this:

csc /r:mylib.dll someprog.cs
Check other useful options by entering csc /?

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top