C# 逗号分隔的字符串转数组,string数组转int数组

逗号分隔的字符串转数组

var deviceVarID=“1,2,3,4”;

//string[] strArray = deviceVarID.Split(',');

 

string数组转int数组
//int[] ids = new int[] { };
//ids = Array.ConvertAll<string, int>(strArray, s => int.Parse(s));

posted @ 2021-12-16 10:08  hao_1234_1234  阅读(2533)  评论(0编辑  收藏  举报