- Declaring an new empty array:
Dim arr() as String = {}
or (this is where the pain begins...why is there a choice?)Dim arr as String() = {}
- Declaring an array with three elements:
Dim arr(2) as String
- Declaring an array with two elements and initializing the values
Dim arr as String() = {"Element 1", "Element 2"}
So - again the pain of VB.NET comes from the urge to want to help us all the time. Why, oh why, are there several ways of doing one thing?
I will sure get back to this post a lot because i forget how this is done every time - much thanks to the "helpfulness" of VB.NET
No comments:
Post a Comment