标签:lis sele ret var tps com convert blog sel
原文:c# List<string>和List<int>互相转换
List<string> 转 List<int>
var list = (new[]{"1","2","3"}).ToList();
var newlist = list.Select<string,int>(x =>Convert.ToInt32(x));
List<int> 转List<string>
List<int> list = new List<int>(new int[] { 1,2,3 } ); List<string> newList = list.ConvertAll<string>(x => x.ToString());
标签:lis sele ret var tps com convert blog sel
原文地址:https://www.cnblogs.com/lonelyxmas/p/11433733.html