views:

521

answers:

1

Hello,

I downloaded zlib.NET and there's a file that I must import,its named "zlib.net.dll".

My question is :How do I import that file so I can use it in C# Express 2008 like "System.zlib.etc"?

Thanks.

+4  A: 

You need to add a reference to the assembly:

  • Copy the DLL into some appropriate directory (I usually create a lib directory somewhere near the code).
  • Open up Visual Studio and load the solution.
  • In Solution Explorer, find the "References" item and right-click on it.
  • Select "Add Reference..."
  • Change to the "Browse" tab and navigate to the DLL

After that you should be able to use it in your code.

Jon Skeet
I couldn't find it in your book.Thanks Jon!
John
... after adding an Imports/using reference.
Cerebrus
@John: No, C# in Depth assumes a fair amount of experience in C# already. If you've bought it as a first C# book, I suggest you get something else to start with then come back to C# in Depth when you've got the hang of the basics.
Jon Skeet