Coming from a C# background, I have no idea why the following declarationr returns an array with length = 2, can someone please enlighten me?
Dim lTestArray(1) As String
Console.WriteLine(lTestArray.Length) (writes 2)
VB.NET array declarations supply the upper bounds (i.e. the maximum index) of the array, not the length. Since arrays are 0-based, a maximum index of 1 gives you two elements (0 and 1).
Array.Resize or the C#-like New syntax for arrays.