List与数组的相互转换
1.从string[]转List<string>
例如:string[] str={“1”,”2”};
List <string> list=new List<string>(str);
2.从List<string>转string[]
例如:List<string> list=new List<string>;
String[] str=list.ToArray();
//ViewState["idlist"]转换成List<>
List<int> idlist=(List<int>)ViewState["idlist"]