How do I use a C# Class Library in a project?

后端 未结 9 2069
北恋
北恋 2020-11-28 05:23

I\'ve created a new Class Library in C# and want to use it in one of my other C# projects - how do I do this?

9条回答
  •  被撕碎了的回忆
    2020-11-28 05:59

    I'm not certain why everyone is claiming that you need a using statement at the top of your file, as this is entirely unnecessary.

    Right-click on the "References" folder in your project and select "Add Reference". If your new class library is a project in the same solution, select the "Project" tab and pick the project. If the new library is NOT in the same solution, click the "Browse" tab and find the .dll for your new project.

提交回复
热议问题