Home > Net >  Novice c # winform for help! How in a project had been certain functions in the another project
Novice c # winform for help! How in a project had been certain functions in the another project

Time:09-21

Project has A good interface, to project B function sets in, novice to cry

CodePudding user response:

Right-click on the project reference, add reference project you want to add

CodePudding user response:

Add existing item,

CodePudding user response:

Right click to add project dependencies

CodePudding user response:

As a DLL project, a project can be another project reference,

CodePudding user response:

To add existing items
In A project reference B project again

CodePudding user response:

Mentioned above can add an existing project, then when the class library reference, another is you see project B the debug directory below will generate DLL, looking for you to use the reference is also possible

CodePudding user response:

What he said is not very clear.


What is your project B? Exe or DLL or other web project you didn't say anything...

If a DLL add references are ok.

If this is the form the binding you like this project is more trouble with it..

CodePudding user response:

A and B in A project, create A new interface in B, citing A

In the code of B
Public partial class Main: Form "" here's the Form you change A try

CodePudding user response:

Give it a try and learn

CodePudding user response:

As a DLL project, a project can be another project reference, right-click to add a new project

CodePudding user response:

B calls can be the equivalent of A in B class instantiates A class A!

CodePudding user response:

Reference B inside all of the DLL dependencies, and then copy the code, there is a third party of the DLL in the bin in the debug
  •  Tags:  
  • C#
  • Related