Array.Clear
Array.Resize
List.Add
配列のサイズを変更します。
Array.Resize<T>(ref array, newSize)
아래 값을 입력하면 예제에 즉시 반영됩니다.
arr
Resize
ref
Console
WriteLine
int[] arr = { 1, 2, 3 }; Array.Resize(ref arr, 5); Console.WriteLine(arr.Length); // 5