A chivalrous guest needs a peerless sword.
I am a. Net developer, and the best platform developed by. NET is not Visual Studio. Today, I will share my secret with you. As a newbie, please forgive me. This is an entry-level technology sharing and is dedicated to those who want to start learning. net. (1) creating a project is the beginning of everything, no matter what kind of project you want to develop. Program The first step is to build a project. I think the biggest role of the project is to facilitate management and maintenance. In vs, Microsoft encapsulates many project templates, each of which is a set of good program architecture with a good file structure and a required Assembly reference, when you need to develop a program, you only need to select an appropriate type of project to quickly develop the program, which also provides convenience for later management and maintenance. (2) anatomy solution a solution represents the entire process of software development. A solution can consist of multiple projects, each of which is an assembly. Each project has a set of standard file structures, and its biggest feature is Code Rear. The following uses a desktop project as an example to describe the file structure in the project. 1. properties -- the project property assemblyinfo. CS records information about the Assembly, such as version information, guid, and copyright information. Resources. resx records the resources contained in the project. resources referenced in the program can be called in an independent file or encapsulated into project resources in the project resource file. Settings. settings records the settings of the project. 2. References include the assembly to be referenced by the program, which can be a. NET component, a COM component, a self-developed class library project, or a DLL file. 3. program. cs -- sample code of the program entry: method features. Declare the method. [Stathread] main method. When the program runs, start static void main () {enable visual styles. You must enable this method before calling any controls. Application. enablevisualstyles (); Set the default text display mode for controls within the application scope, True: displays text in the mode of GDI +, False: displays text in GDI mode, You can only call this method in a program that runs a form separately. You cannot call this method in a plug-in program, This method can only be called before a program creates any form. Application. setcompatibletextrenderingdefault (false); run the program. form1 is the main application of the program. run (New form1 () ;}} 4. form -- form. the CS file is a form-like file. It adopts the code post-structure and divides the form into two modes: Design and code. The control and its attribute code in design mode are stored in form. designer. CS files, while functional code is stored in form. in the CS file, the two files are connected using the keyword partial. Although they are two files, they still belong to the same class logically. Sample Code: the Assembly references using system; using system. collections. generic; -- set using system. componentmodel; -- Component Model Using system. data; -- Data class using system. drawing; -- drawing class using system. LINQ; using system. text; -- text class using system. windows. forms; -- form class namespace, assembly name namespace winform {Class Name: parent class public partial class form1: FORM {field int I = 0; constructor public form1 () {initialization component initializecomponent ();} form loading event, sender trigger object, e event parameter private void form1_load (Object sender, eventargs E) {} method public void method (parameters ...) {code ...}}}