Different data types available in Visual Basic

0
216

In this topic, you will learn about, Different data types available in Visual Basic.

Data types specify memory location size and type for the variable.

Visual Basic provides various data types:

  1. Byte: It specifies integer type variable and it consumes 1-byte memory space in which we can store -127 to 127.
  2. Short: It specifies integer type memory location in which we can store any numeric value. It consumes two-byte memory space and store values between -32708 to 32767.
  3. Integer: It consumes 4-byte memory space for an integer variable in which we can store values between -231 to +231-1.
  4. Single: It creates a memory for the real variable and it consumes 4-byte memory space. Single can be store decimal integer or fractional value where we can specify six decimal digits.
  5. Long: It is used to specify integer variable allow to hold -363 to +263-1.
  6. Double: It is used to create a real type variable and it consumes 8-byte memory space.Double store 15 decimal digits.
  7. Date and Time: Using this datatype we can create a 10-byte memory space in which we can store date and time.
  8. String: It consumes 16-byte memory space but we can store more than size.
  9. Variant: this Data type can be used as the variant keyword for declaration and also create a directory. It consumes 20-byte memory space in which we can store any type of value.
  10. Bool: Using this datatype we can create a boolean type variable where the boolean variable stores true or false value.

Comment below if you have queries related to the above topic, Different data types available in Visual Basic.

LEAVE A REPLY

Please enter your comment!
Please enter your name here