How to VB.Net Dyanamic Array
Dynamic Arrays can resize the capability of the Array at runtime .when you are in a situation that you do not know exactly the number of elements to store in array while you making the program. In that situations we are using Dynamic Array .
Dim scores() As Integer
If you want to keep the existing items in the Array , you can use the keyword Preserve .
ReDim Preserve scores(2)
In this case the Array dynamically allocate one more String value and keep the existing values.
When you execute this source code , the first loop shows first two values stored in the Array. Next loop shows the whole value stored in the Array.