Static and Dynamic
Hml static (Data static)
ASP/ASP. NET Dynamic (Data Dynamics)
C # programming:
(1) Project Structure
. Cs -- source file (program code)
. Csproj -- project file (Manage File items)
. Sln -- solution file (manage projects)
. Config -- configuration file
Four elements of a function: name, input, output, and processing
Main Function
Static void main (string [] ARGs)
{
}
Input statement
String S = console. Readline ();
Output statement
Consystemic writeline ("content to be output ")
Consystemic wrie ("content to be output ")
Difference between writeline and write: automatic line feed after writeline output
(2) Data Types
1. Integer: byte, Int, short, long
2. Float Type: float, double, decimal
3. Character Type: Char (single character, with single quotation marks '')
4. boolean: bool (true, false)
5. string type: string (double quotation marks "")
6. datetime type
(3) variables
1. variable naming rules:
1) variable names: letters, numbers, underscores, @, and Chinese characters.
2) the first character can only be letters, underscores, @, and Chinese characters.
3) The name cannot be the same as the system keyword.
2. variable definition:
Data type variable name [= value]
Example: int A = 1
3. Use of variables:
Value assignment, Value
(4) Constants
1. Classification: symbolic constants and literal Constants
2. Definition of symbolic Constants
Add the keyword const before variable Declaration
Example: const int A = 3
3. Use of symbolic constants: values cannot be assigned. Values can only be set.
4. escape characters:
'\ T' Tab key character
'\' Backslash
'\ ''Single quotes
'\' Double quotation marks
'\ N' line feed
'\ R' press ENTER
Appendix:
; Statement ended
// Comment a row
/* Comment out a region */
Shift + delete a row
CTRL + (K, c) comment the selected row
CTRL + (K, u) uncomment the selected row
Alt + → prompt, change