VB.NET Data Types - i
What are Data types???
} A data type is an attribute of a data which tells the computer (and the programmer) something about the kind of data it is.
Dim Statement (Visual Basic)
} Declares and allocates storage space for one or more variables.
} The Dim statement can declare the data type of a variable. You can specify any data type or the name of an enumeration, structure, class, or interface.
Eg:-
} numberOfStudents As Integer
} days() As Integer
Data Type Rules in VB.Net
} Default Type
If you do not specify datatype, the variable takes the data type of initializer. If neither datatype nor initializer is present, by default, the data type is Object Data Type. If you specify both datatype and initializer, the data type of initializer must be convertible to datatype.
Eg:-
Dim finished As Boolean
Dim monitorBox As System.Windows.Forms.Form
} Different Types
You can specify different data types for different variables by using a separate As clause for each variable you declare. Alternatively, you can declare several variables to be of the same type by using a common As clause. Each variable takes the data type specified in the first As clause encountered after its variablename part.
Eg:-
a, b, c As Single, x, y As Double, i As Integer
Data Types in VB.Net
} Integer
} Long
} Short
} String
} Char
} Boolean
} Etc.
its a beautiful blog post ,I really like this blog post, and I expect to see fresh content on this blog, hoping to notify me when I'll be back.