How to change size of array ?

Size of array can be changed using Array.Resize Method. Array.Resize Method can be used to increase or reduce size.

Syntax :
Array.Resize ( ref array , newsize )

Example :
int[] arrayInt = new int[10];
Resize the above array to new size 20

Array.Resize ( ref arrayInt , 20 )

No comments:

Popular Posts