1、string转换成string[]数组
1 string str = "aaa,bbb,ccc,dddd"; 2 string[] strs = str.Split(',');
2、string[]数组转换成List<string>
1 string[] str={"str","string","abc"}; 2 List<string> list=new List<string>(str);
3、List<string>转换成string[]数组
1 List<string> list=new List<string>(); 2 list.Add("hello"); 3 list.Add("world"); 4 string[] str=list.ToArray();
4、List<string>转换成string
1 List<string> list=new List<string>(); 2 string strp = string.Join(",", list.ToArray());
5、List<int>转换成List<string>
1 List<int> list1 = new List<int>(new int[] { 1,2,3 } ); 2 List<string> list2 = l1.ConvertAll<string>(x => x.ToString());
6、List<string>转换成List<int>
1 var list1 =(new[]{"1","2","3"}).ToList(); 2 var list2 = list1 .Select<string,int>(x =>Convert.ToInt32(x));