1. Define variables:
String strExample; string ("aaa ")
Char chrExample; character ('A ')
Bool blnExample; Bool type (true/false)
DataTime datExample; date type ("09/19/2002 ")
Int intExample; INTEGER (32-bit signed integer)
Double dblExample; floating point number (64-bit double-precision floating point number)
Ii. Various operations:
= Value assignment
+ Addition operation
-Subtraction
* Multiplication
/Division
% Modulo operation
& Logical And
| Logical Or
! Logic Not
Iii. Various structures:
If (condition)
{
}
Else
{
}
Switch)
{
Case option1:
Break;
Case option2:
Break;
}
For (inti = 1; I <= 10; I ++) // note the semicolon
{
}
While (condition)
{
}
Do
{
} While (condition );
Iv. Notes:
1. VB users may easily miss the semicolon at the end of the statement;
2. People who are familiar with VB can use variables but do not declare them. This is not allowed by C # by default;
3. When passing parameters to a function, use parentheses: Response. Write "aa.
I can hardly say that I am talking about a language. To learn a language, you not only need to learn grammar, but also the characteristics of the language, I hope you can buy a C # book to study the features of C # as a new language. Today, let's talk about WEB controls.