📌  相关文章
📜  c# string console readline array - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:38.143000             🧑  作者: Mango

代码示例1
string foo = Console.ReadLine();
string[] tokens = foo.Split(",");
List nums = new List();
int oneNum;
foreach(string s in tokens)
{
    if(Int32.TryParse(s, out oneNum))
        nums.Add(oneNum);
}