Visual Basic Language Reference  

Integer Data Type

Integer variables are stored as signed 32-bit (4-byte) integers ranging in value from -2,147,483,648 through 2,147,483,647.

The Integer data type provides optimal performance on a 32-bit processor, as the smaller integral types are slower to load and store from and to memory.

Note   The Integer data type can be converted to the Long, Single, Double, or Decimal data type without encountering a System.OverflowException error.

Appending the literal type character I to a literal forces it to the Integer data type. Appending the identifier type character % to any identifier forces it to Integer.

The equivalent .NET data type is System.Int32.

See Also

Data Type Summary | Int32 Structure | Long Data Type | Short Data Type | Type Conversion Functions | Conversion Summary | Efficient Use of Data Types