Monthly Archives: December 2006

2 posts

Data Type Summary (Visual Basic)

Visual Basic type Common language runtime type structure Nominal storage allocation Value range Boolean Boolean Depends on implementing platform TrueFalse Byte Byte 1 byte 0 through 255 (unsigned) Char (single character) Char 2 bytes 0 through 65535 (unsigned) Date   class=SpellE>DateTime 8 bytes 0:00:00 (midnight) on January 1, 0001 through 11:59:59 PM on December 31, 9999 Decimal Decimal 16 bytes 0 through +/-79,228,162,514,264,337,593,543,950,335 (+/-7.9…E+28) † with no decimal point; 0 through +/-7.9228162514264337593543950335 with 28 places […]

Controlling Variables in For Loops

The For and For Each loops let you define their controlling variable as a block variable, using this syntax: For i As Integer = 1 To 10 … Next This syntax was introduced in Visual Studio.NET 2003. Many books and articles, however, continue to use the old syntax: Dim i As Integer For i = 1 To 10    … Next The new syntax is preferred in all cases because it prevents you from accidentally reusing […]