Sunday, 15 October 2017
Saturday, 2 January 2016
ReDim preserve ,ReDim, Array.Resize Implementation of the function.
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
Subscribe to:
Posts (Atom)