Today the main learning of the C # Language Foundation, personally think the main points are: The main function of the output input statement, shortcut key application, annotation recognition, data type, basic type conversion and operators.
1 input and output statements for main functions
Content is filled in the static void Main (string [] args) {contents};
Console.Write (); Output statement
Console.WriteLine (); Output statement, wrap line
Console.ReadLine (); Input statement
2 Application of shortcut keys
Shift+delete Delete a row
Ctrl+x Cut
alt+→ Tips
3 Recognition of annotations
Use//indicate, put on the leftmost side of the row.
I think the comment has two points, one is the part that does not execute the comment when executing the program. The second is the role of interpretation.
4 Data types
String Type: String
Value types: Date type datetime, enum type enum, struct type struct.
Float type: float double dfcimal
Boolean: BOOL has only two values of true and False
Integer: byle short int long where int is used most.
5 Basic Type Conversions
The main talk is int a = Int.parse (string type), where int can be replaced by another type.
6 operator
A++//a=a+1 ++a//a=a+1
A--//a=a-1--a//a=a-1
Where the difference between the operation: b=a++ is b=a,a=a+1. First Use after add
B=++a means a=a+1,b=a. First add and then use
The remaining multiplication, greater than less than,&&, | |,! I've been in high school.
Conditional operator? : such as a>0: not to come,//if a>0, is to come. If not a>0 will not come.
Assignment op A + = 5;//a=a+5;
A-= 4;//a=a-4;
a *= 5;//a=a*5;
a/= 3;//A=A/3;
a%= 3;//a=a%3;
7 Escape characters
This is to avoid the use of command-type obfuscation, in other ways to represent the same meaning character.
Because the simple look of the escape character to see the obscure, when used to see the advantages.
Finish!!
Training the next day