简体   繁体   中英

How to use .dll class files in visual studio?

I have download a folder of .dll files from codeplex.com to add and use a class in my project but I don't know how to use them.It is about zip files with c# and here is the link: http://dotnetzip.codeplex.com/

Thanks!

Add a reference to the DLL and try the sample code:

 using (ZipFile zip = new ZipFile())
 {
     // add this map file into the "images" directory in the zip archive
     zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
     // add the report into a different directory in the archive
     zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
     zip.AddFile("ReadMe.txt");
     zip.Save("MyZipFile.zip");
 }

Add them as references in your project/solution and include using statements to the namespaces in each that you wish to use.

The classes will then be available for usage in your application.

In general, when you want to use a library, you will want to start by reading the documentation.

You can usually find a link to it if you scan the library's home page. In this case, "DOCUMENTATION" is a tab at the top of the screen. If you click it , you land at a page with two links:

Both of those pages would be good places to start reading to learn how to use the library.

They'll probably tell you to download Ionic.Zip.dll , add a reference to it to your project, and then create an instance of the ZipFile object. Any good book on your language dialect of choice will have a section on how to add references to external libraries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM