ReDim: Make the array larger
Imports System Public Class MainClass Shared Sub Main() 'Declare an array Dim strFriends(4) As String 'Populate the array strFriends(0) = "R" strFriends(1) = "B" strFriends(2) = "S" strFriends(3) = "S" strFriends(4) = "K" ReDim Preserve strFriends(6) strFriends(5) = "M" strFriends(6) = "J" For Each strName As String In strFriends System.Console.WriteLine(strName) Next End Sub End Class
1. | ReDim an Array: new Array | ||
2. | Changes the number of elements of an array to the specified new size. |