[VB.NET Tips] Tips for Basic Data Types

Time:2019-9-10

1. Type Characters
Sometimes it is necessary to add type characters after direct quantities to specify the type. Here are the commonly used type characters.

type character
Short S
Integer I
Long L
Decimal D
Char c
Single F
Double R
Octal number system Leader & O
Hexadecimal Leader & H

2. Decimal data type
Decimal data type, which is an accuracy type, is used to represent decimal numbers in programming.
Single, Double is a floating-point decimal is an approximation, and different results may occur on different CPU platforms.
The same is true in databases. Decimal should be used for small number segments, otherwise unexpected results will be obtained.
Most CPU platforms have special methods to deal with floating-point numbers, but they are not specific to Decimal data types, so Decimal is slower to process than floating-point numbers and takes up more space.

3. String data type
The default value of String is Nothing, but VB.NET treats Nothing as an empty string when it compares.

4. Object Data Type
The default value of Object is Nothing, but when an Object variable with a value of Nothing is converted to another base type, Nothing is converted to the default value of the target type.

5. Boolean data type
Boolean can be converted to numerical types, but all transformations are considered contraction transformations.
True is converted to – 1 and False is converted to 0. For the Byte type, True is converted to 255.

Recommended Today

Summary of basic knowledge points of react

Contents of this document: 1. React entrance 2. JSX syntax 3. Components 4. Use setstate correctly 5. Life cycle 6. Component composition 7.redux 8.react-redux 9.react-router 10.PureComponent 11. Know hook 12. Customize hook and hook usage rules 13. Usememo and usecallback of hook API Reference website:https://zh-hans.reactjs.org/docs/getting-started.html 1. React entrance start Create project: NPX create react app […]