Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Basic
 Short Data Type
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Basic Language Reference
Short Data Type (Visual Basic)

Holds signed 16-bit (2-byte) integers that range in value from -32,768 through 32,767.

Use the Short data type to contain integer values that do not require the full data width of Integer. In some cases, the common language runtime can pack your Short variables closely together and save memory consumption.

The default value of Short is 0.

Programming Tips

  • Widening. The Short data type widens to Integer, Long, Decimal, Single, or Double. This means you can convert Short to any one of these types without encountering a System..::.OverflowException error.

  • Type Characters. Appending the literal type character S to a literal forces it to the Short data type. Short has no identifier type character.

  • Framework Type. The corresponding type in the .NET Framework is the System..::.Int16 structure.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker