------------------------------------------------
Key Tips:
1, the Program notes: Single-line comments, multi-line comments;
------------------------------------------------
1th section. NET learning route and a few confusing concepts
C # Procedural programming syntax
C # Object-oriented basic syntax
Basic Class Library
A large number of case exercises
Mysql SQL Server
ado
A large number of case exercises
Integrated projects
Subsequent html/javascript/three-tier architecture/asp.net/Project
Three concepts:
. Net: Platform, provides write program of virtual machine, class library etc. (dot net pronunciation, knife net don't call dot net)
C #: Development language (can also be vb.net PowerShell Rube)
asp: Technology for. Net Development website (mobile microcontroller, etc.)
------------------------------------------------
2nd section. NET development environment Description and installation
VisualStudio (VS) recommends using version 2012 (official, free Express version), open source Tools (MonoDevelop SharpDevelop)
Downloads for VisualStudio 2012:
1:http://www.xiazaiba.com/html/7678.html
2:http://www.jb51.net/softjc/64094.html
The. Net framework is installed to develop, and compiling and running programs does not require vs.
. Net Framework Version: 2.0 3.0 3.5 4.0 4.5 version compatibility (compatibility with low version, not compatible with high version)
The operating system recommends the use of Win7.
------------------------------------------------
3rd. Notepad writing and compilation program (*)Notepad development
As far as possible to do, it is not configured to do not matter, the next section is about vs.
Steps:
1, create a new text file, content:
Using System; Class test{ static void Main (string[] args) { Console.WriteLine ("Like Peng Net"); Console.readkey (); }}
2, Save As Test.cs (C # file suffix is. cs), note the file extension is displayed. Different operating system Setup methods are not the same. Note: C # is case-sensitive, so you cannot write main to main, and do not write main incorrectly as Mian, we are not "selling noodles";
3. Open cmd command prompt (start → run/win+r)
4, CD into the folder where Test.cs, execute: C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe Test.cs, Build Test.exe
5, the implementation of Test.exe
C # Programmers can also this cow B, but we generally do not leak deep!
------------------------------------------------
4th section. NETFramework Introduction, interface is not our focus (*)
. NET program runs must depend on the. NET Framework and cannot run independently.
The generated EXE, DLL is not ordinary "native", but called "Assembly", is "msil/il" binary bytecode.
The CLR (runtime) in the. NET Framework is at the heart of running a. NET program
Linux, iOS, and other non-Windows systems can also run. NET programs: Through Mono.
You can also use Xamarin to develop mobile programs on Android and iOS.
Microsoft is already going to. NET open source, you can run. NET programs on Linux, iOS, and provide free visual Studio Community
------------------------------------------------
5th Section VisualStudio Basic use1. Create a new project (a collection of a bunch of code) (File New project (installed template C # console program)) Program.cs *.csproject Project description file app. config config file Bin write code generated *.exe run file bit *.sln Solution Description File Note: 1. Do not use Chinese, enclose the number and "" quotation marks. 2.c# is a case-sensitive compilation failure, viewing the Error List view, which contains error messages. You can create more than one project under a solution. When you open 1 CS files, the project that you are opening opens. Console.readkey () waits for the user to enter a key. Which startup project should be selected when multiple projects are (auto-complete). "Set as Startup Project"
------------------------------------------------
6th Comment (code ignored by the compiler)
Comments are ignored by the code compiler. Role: Explain the role of the code: in the program to properly annotate, shielding useless code.
Use the "//" Comment line of code,//after which the code compiler ignores (annotate the example code).
Ctrl +e +c Comments
Ctrl +e +u Uncomment
/**/comment Multiple lines of code.
(*) There are also "///" Documentation comments.
------------------------------------------------
7th. Anti-compile artifact and compiler optimizations
Compile:generate EXE
Decompile: exe = CS
To download the Anti-compilation tool:
1) Reflector (reminder, install Reflector install version may cause vs card dead, crash, so please use green Free install version)
1:http://www.xiazaiba.com/html/5268.html
2) Ilspy
1:http://www.orsoon.com/soft/14703.html
2:http://ilspy.net/
The principle cannot be restored:
1. Note No
2. Compiler optimizations, code that has no meaning and impact on the system will be optimized (useless variables, constants merged)
------------------------------------------------
such as Peng Network: http://www.rupeng.com
such as Peng Network. NET Foundation 1 Chapter I.:. NET Getting Started