Different data types available in visual basic

5 Shares

Different Data types specify memory location size and type for 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 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 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 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 a variant keyword for declaration and also create a directory.It consumes 20-byte memory space in which we can store any types of values.
  10. Bool: Using this datatype we can create boolean type variable where boolean variable store true or false value.

5 Shares

2 Comments

  1. ANAND March 17, 2018
    • Buildprogrammer March 17, 2018

Leave a Reply