Resizing an array at runtime in C#. Raw. ResizeArray.cs. int myArray = new int[0];. for (int i = 0; i < 10; i++). {. Array.Resize(ref myArray, myArray.Length+1);.
確定! 回上一頁