How to resize a two-dimensional array without affecting its value?
Use ReDimwith modifier Preserve. VB.NET ensures that the original values are not affected. Did not read the documentation. ReDim Preserveallows you to change the length of the last dimension of the array.
ReDim
Preserve
ReDim Preserve
You need to select a new array (with the correct size) and manually copy the elements from the first array to the second.
As Adam said, you cannot resize 2D arrays dynamically. You can easily copy an existing array to a larger one, for example:
Dim smaller(1, 1) As Byte Dim bigger(2, 2) As Byte Array.Copy(smaller, bigger, smaller.length)
array.resize, .net 2 framework .
array.resize
:
Dim MyArray() as string Array.Resize(myarray,12)
Source: https://habr.com/ru/post/1741411/More articles:Optimal difference between object lists in Java - javaRecommendations for processing binary data in Ruby? - ruby | fooobar.comMPI data type for 2 d array - arraysKohonen SOM Maps: normalizing input with an unknown range - machine-learningC ++: binding to a base class - c ++MVC ActionLink generating NON-Restul URL AFTER constraints are added - c #Android service onBind → onStart - androidDisallow auto selection in focus text field - .netOrder Linq Subtitled - asp.netОтображение строк комментариев HTML () в файлах HTML - htmlAll Articles