In the past, the development program software, basically is the use of a development language, either C #, either Java, or Delphi and the like. Recently saw some C # multi-project integration into a solution to develop the way, I think this is a good way. Let's build a simple example to feel the beauty of Microsoft's platform for multilingual development.
Development process:
1. New C # Windows program project
2. New VB Class Library project
Add a class library to just the C # project ("Add to Solution")
After the project has been completed, such as:
3, write VB Class library code
New test Method SayHello (), simple output information hint.
4. Add Project References
Add a project reference, the VB project, to your C # project.
5. Design form and write C # form event code
Using system;using system.windows.forms;using classlibrary1;namespace windowsformsapplication1{public Partial Class Form1:form {public Form1 () { InitializeComponent (); } private void Button1_Click (object sender, EventArgs e) { new Class1 (). SayHello ();}}}
6. Test results
Multi-project hybrid development mainly has the following benefits:
Layered design, each layer can be independently developed to facilitate the division of labor;
Add references between the different projects, compile the DLL file, publish the DLL or source code according to your needs;
Modular development, to facilitate the formation of code assets, similar projects in the future only need to reference the relevant projects, to avoid referencing redundant code;
Another point is that the other language platform can not reach, is to play the advantages of different languages under the. NET platform, programmers using different languages can jointly develop a project.