Chapter 3. Fundamental Types

 <  Day Day Up  >  

All information stored or used by a Visual Basic .NET program has a type. A type describes a piece of information to the .NET Framework, saying how it is used and stored. By assigning every piece of information a type, the language can enforce type-safe programming , which ensures that information is always interpreted in a correct manner, helping to reduce programming errors.

There are 11 fundamental types in Visual Basic .NET. All the fundamental types support literals , which are a textual representation of a particular value of a fundamental type. For example, the string 10.5 is a Double literal that represents the decimal value 10.5. The fundamental types are listed in Table 3-1.

Among the 11 fundamental types are seven numeric types. These numeric types split into three categories: integers of varying ranges ( Byte , Short , Integer , and Long ), floating-point numbers of varying ranges and precision ( Single and Double ), and a decimal number with a fixed range and precision ( Decimal ).

 <  Day Day Up  >  


The Visual Basic .NET Programming Language
The Visual Basic .NET Programming Language
ISBN: 0321169514
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Paul Vick

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net