
Data Types | 55
Variables and
Data Types
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Storage Size: 1 byte
Value Range: -128 to 127
New in 2005. The
SByte data type is the smallest signed integer data type
supported by Visual Basic. It acts as the signed counterpart to the unsigned
Byte
data type.
The
SByte data type is one of four Visual Basic data types, added in the 2005
release of the language, that are not compliant with the minimal Common
Language Specification. Components and applications using that standard may
not be compatible with applications that use the
SByte data type.
Short data type
Quick Facts
Core .NET Type: System.Int16
Implementation: Value Type (Structure)
Storage Size: 2 bytes
Value Range: -32,768 to 32,767
The
Short data type is a 16-bit signed integer data type. In pre-.NET versions of
Visual Basic, the
Integer data type was a 16-bit signed data type; the Short data
type did not exist in Visual Basic before .NET.
Literal instances of
Short data append the letter “S” to the end of the numeric
value.
Dim startingValue As Short = 123S
Single data type
Quick Facts
Core .NET Type: System.Single
Implementation: Value Type (Structure)
Storage Size: 4 bytes
Value Range: -3.402823E+38 to -1.401298E-45 for negative values, and
1.401298E-45 to 3.402823E+38 for positive values
Values of type
Single are IEEE 32-bit (4-byte) single-precision ...