Rupeng Net. Net basics 1 Chapter 1:. net entry,. Net
------------------------------------------------
TIPS:
1. Program comments: single-line comments and multi-line comments;
------------------------------------------------
Section 1st. Net learning routes and several confusing concepts
C # process programming syntax
C # basic object-oriented syntax
Basic Class Library
A large number of case exercises
Mysql sqlserver
Ado.net
A large number of case exercises
Integrated Project
Subsequent HTML/JavaScript/L3 architecture/asp.net/project
Three concepts:
. Net: The platform provides virtual machines and class libraries for writing programs (dot net should not be called dot net)
C #: development language (or VB.net PowerShell rube)
ASP. Net:. net development website Technology (mobile phone MCU, etc)
------------------------------------------------
Section 2nd. Net Development Environment Description and Installation
Visual Studio (VS) is recommended to use version 2012 (official, free Express version) and the open-source tool MonoDevelop SharpDevelop)
Download Visual Studio 2012:
1: http://www.xiazaiba.com/html/7678.html
2: http://www.jb51.net/softjc/64094.html
With the. Net Framework installed, you can develop programs without.
. Net Framework Version: 2.0 3.0 3.5 4.0 4.5 and other versions compatible (to the lower version, not to the higher version)
Windows 7 is recommended for operating systems.
------------------------------------------------
Section 3rd compile the program with notepad and csc (*)Notepad Development
Try to do it later. It's okay if the configuration doesn't come out. Next, let's talk about.
Steps:
1. Create a text file with the following content:
Using System; class Test {static void Main (string [] args) {Console. WriteLine ("rupeng net"); Console. ReadKey ();}}
2. Save it as Test. cs (the C # file suffix is. cs). Note that the file extension is displayed. Different operating systems have different settings. Note: C # is case-sensitive. Therefore, you cannot write Main as main. Do not mistakenly write Main as Mian. We are not "selling;
3. Open the cmd command prompt (start → run/Win + R)
4. Run cd in the folder where Test. cs is located and run: C: \ Windows \ Microsoft. NET \ Framework \ v4.0.30319 \ csc.exe test.csto compile and generate test.exe.
Execute test.exe in 5th Region
C # programmers can also be cool B, but we generally keep it hidden!
------------------------------------------------
Section 4th. netframework introduction and interface are not our focus (*)
. Net programs must depend on. Net Framework and cannot run independently.
The generated exe and dll are not common "native", but "assembly" and are "MSIL/IL" binary bytecode.
The CLR (runtime) in. Net Framework is the core of the. Net program.
Linux, IOS, and other non-Windows systems can also run the. net program through Mono.
Android and IOS can also use Xamarin to use C # To develop mobile apps.
Microsoft has released. Net open-source, which can run. Net programs on Linux and IOS, and provides Visual Studio Community for free.
------------------------------------------------
Section 5th basic use of Visual Studio1. create a project (a collection of Code) (file new project (template C # console Program installed) Program. cs *. csproject project description file App. config configuration file Bin written code generated *. location of the exe running file *. sln solution description file note: 1. do not use Chinese characters; quotation marks and "" quotation marks. 2. C # is a case-sensitive compilation failure. Check the "Error List" view, which contains error information. You can create multiple projects under a solution. When opening one CS file, the project will be opened. Console. Readkey () waits for the user to enter a key. (Automatically completed) which startup project should be selected when multiple projects are created. "Set as startup project"
------------------------------------------------
Section 6th comments (Code ignored by the compiler)
The annotated code compiler does not. Purpose: describe the role of the Code: Add appropriate comments in the program, and block useless code.
Use "//" to comment out a line of code, and the code compiler will ignore it (add a comment to the example code ).
Ctrl + E + C comments
Ctrl + E + U uncomment
/**/Comment out multiple lines of code.
(*) There is also a "//" document comment.
------------------------------------------------
Section 3 decompilation artifacts and Compiler Optimization
Compile: CSC generates exe
Decompilation: exe => cs
Decompilation tool download:
1) Reflector)
1: http://www.xiazaiba.com/html/5268.html
2) ILSpy
1: http://www.orsoon.com/Soft/14703.html
2: http://ilspy.net/
In principle, it cannot be restored as is:
1. The comment does not exist.
2. Compiler Optimization: code that has no meaning or impact on the system will be optimized (useless variables and constant merging)
------------------------------------------------
Rupeng Network: http://www.rupeng.com