1. type conversion of Variables
1. Concept of type conversion
2. implicit conversion
Implicit conversion Principle: For any value type A, as long as its value range is fully included in the value range of value type B, then this type, it can be implicitly converted to B type;
3. Display Conversion
4. Convert string to simple data type
I. Enumeration type
Enum <enumeration Name> {
<Value 1>,
<Value 2>,
<Value 3>,
...
}
<Value 1>,
<Value 2>,
<Value 3>,
...
<Value 1 >=< value in the basic type>, // The default value is 0. The value is customized here.
<Value 2 >=< the default value is the previous value plus 1>, // The next value. If the value of the basic data type is not specified
// Add 1 on the basis of the previous one. Of course, this can also be a custom value.
<Value 3>,
...
3. How to Use
Ii. Structure Type
1. Why structure?
2. Define the structure
3. assign values to the structure
4. Structure usage
Iii. array type
1. What is an array?
2. Declaration and initialization of one-dimensional arrays
3. traversal of one-dimensional arrays
4. foreach Loop
5. Multi-dimensional array
(1)Declaration and initialization Methods
Initialization:
(2) Traversal
6. array Array
1) Declaration and initialization Methods
Statement: <Type of each element in the array> [] [] jargedarray;
Initialization: Initialization is slightly different and complicated.
(2) Traversal