I have 2 projects under a solution, so how do I invoke resources for other projects under a project, such as forms, classes, methods, properties, etc.??

Source: Internet
Author: User

The following diagram shows how to reference another project in one project

SLN is the solution
Csproj is a C # project
Project is a collection of files
A solution is a collection of projects
Contains a relationship that contains multiple csproj in one sln. A csproj contains multiple files.
Sln:solusion
CSPROJ:C Sharp Project
Csproj can be run as a separate project, or you can add csproj Unified management in SLN.
If your solution contains only one project, it is the same as opening the project and solution.
However, there may be multiple projects in a solution in a system
Open a project in one of the projects when this project is opened, the back automatically opens his solution!
How C # calls a class for another project
I have 3 projects under a solution, so how do I invoke resources for other projects under a project, such as forms, classes, methods, properties, etc.??
Add a reference to a project, such as some classes or methods that you want to invoke for Project B,
On Project A, right-click Add Reference (Add Reference) to select the local project, locate the B project, and add the reference.
Use of using B in the program
This allows you to use the classes and methods in B.

I have 2 projects under a solution, so how do I invoke resources for other projects under a project, such as forms, classes, methods, properties, etc.??

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.