I Declared my Array like this:
Dim invoice_discountitems(100, 1) As String
Now i set values into the array:
invoice_discountitems(0,0) = "test1"
invoice_discountitems(0,1) = "test2"
invoice_discountitems(1,0) = "test3"
invoice_discountitems(1,1) = "test4"
Now I tried to count the elements:
MsgBox(invoice_discountitems.GetLength(0) - 1)
But it display the array size (100,1) I want to display (2) elements
You are displaying the length of the first dimension of the array not the second
http://msdn.microsoft.com/en-us/library/system.array.getlength.aspx