ReDim preserve ,ReDim, Array.Resize Implementation of the function.
Console application vb.net
Module Module1
Sub Main()
Dim arr(2) As Integer
arr(0) = 10
arr(1) = 20
arr(2) = 30
Dim i As Integer
For i = 0 To arr.Length - 1
Console.WriteLine(arr(i))
Next
Console.WriteLine("Array Length is {0}", arr.Length)
' Array.Resize(arr, 6)//comment
ReDim arr(6)
'ReDim Preserve arr(6)
For i = 0 To arr.Length - 1
Console.WriteLine(arr(i))
Next
Console.WriteLine("Array Length is {0}", arr.Length)
Console.ReadLine()
End Sub
End Module
ReDim Only
ReDim Preserve And array.resize
ReplyDeleteNice post.I really appreciate your work. These are the helpful information. Thanks for sharing.
Tutoring Service Lucknow | Home Tuition Services
www.croydoncar.co.uk/
ReplyDelete