string数组转int

List types = new List();
if (!string.IsNullOrEmpty(type))
{
types = Array.ConvertAll<string, int>(type.Split(',').ToArray(), s => int.Parse(s)).ToList();
}

posted @ 2023-12-08 11:39  讠讠讠  阅读(22)  评论(0)    收藏  举报