try this..,
this code may helps you
string strarray = "1,2,3,4,5,6,7";
string[] splitarr = strarray.Split(',');
Int32[] intarr = new Int32[splitarr.Length];
for (int innlop = 0; innlop < splitarr.Length; innlop++)
intarr[innlop] = Convert.ToInt32(splitarr[innlop]);
user need to enter values with a delimiter(",")
thanks