62,041
社区成员
发帖
与我相关
我的任务
分享
string str = "1,2,3,4,5";
string[] strList = str.Split(',');
List<int> nums = new List<int>();
for (int i = 0; i < strList.Length; i++)
{
nums.Add(int.Parse(strList[i].ToString()));
}