Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does vb perform type conversion?
How does vb perform type conversion?
String, digital conversion, very common are

Convert a number into a string: str

Convert a string to a number: val

The following is mandatory conversion, mandatory conversion, characterized by starting with C.

Cast to boolean type: CBool

Convert to byte type: CByte

Forced conversion to currency type: CCur

Forced conversion to date type: CDate

Forced conversion to double-precision floating-point number: CDbl

Forced conversion to plastic: CInt

Forced conversion to long shaping: CLng

Forced conversion to single-precision floating-point number: CSng

The above are the most commonly used, and some are less used, such as CDec and CVar, so I won't introduce them.