Lecture 4 - Programming With VB
Lecture 4 - Programming With VB
USING VB.NET
By:
Collinson Colin Agbesi
Recommended Textbooks
1. Mike Snell & Lars Powers; “Microsoft Visual Studio 2010
Unleash” Pearson Education, Inc.
2. Evangelos Petroutsos, “Mastering Microsoft Visual Basic
2010”, Wiley Publishing Inc.
DATA TYPES
Classification of Datatypes:
Character: A character is a unit of information that roughly
corresponds to a symbol such as in an alphabet or number. A
character is used to represent a single value.
String: A string is a sequence of characters, either as a literal
constant or as some kind of variable. A string is used to
represent multiple characters. Strings are also used to store
alphabets and numbers (alphanumeric values)
Integer: An integer is a positive or negative whole number.
Float: A float is datatype which is used to store short decimal
values or fractional numbers.
Double: A double is a datatype which is used to store long
decimal values or fractional numbers.
Boolean: Boolean is a data type that has one of two possible
values; a True (1) or False (0) which is used to represent the
truth values of logic gates and Boolean algebra.
DATA TYPES
Classification of Datatypes:
Data
Size Description Examples
Type
Character 2 bytes Stores a single character/letter or ASCII values A, B, C, 1,2,3
Short 2 bytes Stores whole numbers from -32,768 to 32,767 50010, 66000