there is the option to do this in vb.net
Dim a, b, c As Single, x, y As Double, i As Integer
also you can do
Dim myString = String.empty
Is there a way to initialize and assign multiple variables like the first example but using the assignment as the second one?
I tested it in VS 2008, but I don’t think that the Syntax of the Dim statement changed since. You will have to specify the type for each variable, if you initialize them
Or you can let VB infer the type and use type characters (here
!forSingle):By hovering with the cursor over the variables in VS you will see that the types are inferred correctly as
Single,DoubleandInteger.You could also use
Ffor single. See: Constant and Literal Data Types (Visual Basic)