How to

resize array

Published: 30. January 2012 | Updated: 30. January 2012
License: Microsoft Public License (MS-PL)
Categories: Framework » Arrays
Tags: Array C#
Was this snippet helpful for you? YESYES / NONO
int[] array = new int[5];

Console.WriteLine(array.Length);

Array.Resize(ref array, 10);

Console.WriteLine(array.Length);
Console Output:
5
10
Send us feedback about this snippet »



Related Snippets: