First, computer language
1. Computer language includes: c\php\ruby\java\c#\basi\js\c++
2. History of computer language: Machine language--assembly language--high-level languages
Second, the Code
1, Program always: Code (code), Compile (Compile), run (running)
2. Intermediate Code Conversion software Net
3, the output mode of the code: 1, Console.Write ("text content");--output text at the cursor position
2, Console.WriteLine ("Text content");--output text at the cursor position, then wrap.
Third, the data
1, C # Common data type 1, char single text plus ' single quotation mark
2, String Unlimited number of words (can be 0) plus "" "double quotation marks
3, int integer Direct write
4, double decimal direct writing
2. Variables
1, definition: Represents a piece of memory space to store data
2, declaration--Data type + space + variable +;
3, assignment-variable name = data;
3, variable name hard requirements
1, the variable name can only be composed of numbers, letters, underscores.
2. Variable names must not begin with a number.
3. The variable name must not be the same as the keyword.
4. Variable names in the same function must not be the same.
4. Soft Requirements for variable names
1, words too literally
2. First Letter Lowercase
3, except the first word Weishou letter to capitalize
5, the use of variable skills
1, Merge declaration--different variable names are directly separated by commas.
2, declaration initialization--the variable is initialized while declaring a variable.
3. Variable three elements--type, name, value
6. Data operation
+ (plus)-(minus) * (multiply)/(except)% (remainder) The return type is the same as the operation type
7. String arithmetic
+ (stitching) return type: String (String type)
8. Input statement consle.readline ();--Get user input in console
9, type conversion: one type of data, through conversion, to get another data.
C # language and variables, data types