1. C # the unique data type sbyte can be-128 to 127. Short is a 16-bit data type, and ushort is a signed short type. in C, the highest precision is decimal type, up to 128 bits, which can indicate data with a maximum precision of 7.9e28 to 1.0e-28.
2. to display a number with complete precision, the literal value must be explicitly declared as a decimal type, which is achieved by appending an M, for example
System. Console. writeline (1.1234567890123456789) will output 1.12345678901234, and system. Console. writeline (1.1234567890123456789 m) will display 1.1234567890123456789
3. C # support for scientific and technical methods (exponential Notation) system. Console. writeline (6.023e23f)
4. To display other hexadecimal numbers, use placeholders to implement system. Console. writeline ("0x {0: x}", 42). 0x2a is output.
5. Round-trip format
6. C # character type char is a 16bit character with a placeholder width. The backslash + special characters can display characters that cannot be directly inserted into the source code. This combination is called an escape sequence, adding a @ symbol before the string will prevent the escape sequence from being processed, but \ + "will still be treated as an escape sequence.
7. Note that C # strings provide more methods than C ++. For example, trim
8. Note that all strings in C # are unchangeable.
9. If a large number of strings need to be modified, for example, to construct a long string through multiple steps, stringbuilder is recommended.
10. null can only be assigned to the reference type, pointer type, or null type.
11. Unlike C ++, void is not a data type and can only be used to indicate that a function has no return value.
2.c # implicit type local variable ver can not specify the type
13. All types of C # can be divided into two types: reference type and value type.
1) The value type is the value that directly contains the variable
2) The reference type stores the memory storage location of the objects they contain.
14. Although the null value cannot be assigned a value type, you can use the "null modifier" to make a value type be null.
Int? Count = Bull
15. Type forced conversion and checked. Use of unchecked Blocks
16. Use. parse or tryparse to replace numeric data. In addition, in C #, all types support the. tostring method.
#17. For array usage, you can use new or not use new. Using New will make the array instantiate the data type at runtime.
18. If the array is not initialized when it is not defined, the system will automatically initialize each element as their default type at runtime. The initialization value can be obtained by default (type name ).
19. Two-dimensional arrays are declared using the type name [,], for example, int [,].
20 The staggered array of C # Must be instantiated using new. Example
Int [] [] cells = {
New int [] {1, 2, 3 },
New int [] {1, 2 },
New int [] {1}
};
21. The array supports the. Length attribute. The. Length attribute of the multi-dimensional array returns the number of all elements.
22. The system. array class contains many common array methods.
#23. getlength can obtain the dimension of a multi-dimensional array
24. Strings can be used as Arrays