Visual Studio 2010 generates and calls a DLL file (C #)

Source: Internet
Author: User
Tags visual studio 2010

1. Create a new C # console application. The project name is createbll. Open program. CS and rename it to TESTA (you can not rename it) and modify the code,


After writing, you can write other class. CS files.
2. Click "project" in the menu bar and select "createdll properties" from the drop-down list to open the window.


Select "class library" in the output type, close the window, and generate a solution, that is, generate creatbll. DLL file, in the project createbll \ bin \ debug \ createbll. dll Directory.

3. reference the DLL file, create a project referencedll, copy and paste the createbll. dll file generated above to the debug folder of the new project.



4. Right-click the reference in the referencedll project solution. The dialog box is displayed.

Under the browser tab, open the debug file under the referencedll project, find the copied createbll. dll file, and click OK to reference it. 5. Double-click createbll under the reference to open the Object Browser and expand the visible method Testa encapsulated in the createbll. dll file.

6. Compile the corresponding code in the program
Reference createbll first, and then use the code to call the methods in the DLL.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.