July 2003
Intermediate to advanced
736 pages
16h 35m
English
When you declare a variable in VB6 you use the dim statement. VB .NET supports the dim keyword. The difference is that you can and are encouraged to dim variables, create instances of them, and provide initial values all on the same line in VB .NET.
Declaring and creating an instance is referred to as instantiation. Here are several examples of declaring variables, followed by examples of instantiating objects.
Dim I As Integer = 5
Dim S As String = "Welcome to Valhalla Tower Material Defender!"
Dim ADate As DateTime = DateTime.Now
Dim Objects As New Object(){1, 2, DateTime.Now, "Some Text"}
Dim Log As EventLog = New EventLog()
The first statement declares an integer I initialized to 5. The second statement initializes a ...
Read now
Unlock full access