The four signed types are
- 8 Bits - sbyte - range -128 to +127.
- 16 bit - short - range -32768 to +32767.
- 32 bits - int - range -2,147,483,648 to +2,147,483,647
- 64 bits - long - -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
- 8 Bits - byte - range 0-255.
- 16 bit - ushort - range 0 to +32767.
- 32 bits - uint - range 0 to 4,294,967,295.
- 64 bits - ulong - range 0 to 18,446,744,073,709,551,615
Integers, no matter what size, are probably the commonest used type as they are required for looping, indexing and counting. Example 1 shows declaration and assignment of the various types. It includes timing code so you can measure how long it takes to assign variables of the appropriate type. As a general rule, use ints- smaller sizes (byte, short, sbyte and ushort) are usually slower but if space not speed is a factor then the smaller size is more appropriate.
On the next page : About Example 1

