If you want a variable length array,then you can use Arrarylist.
To use arraylist,
Firstly Import the namespace,
System.Collections;
and the use Arraylist in following way,
ArrayList arr = new ArrayList();
arr.Add("val1");
arr.Add("Val2");
One key advantage of using Arraylist over arrays is that they can grow and shrink as the number of stored objects changes.