📜  读取多个数字 c# 代码示例

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

代码示例1
//Read line, and split it by whitespace into an array of strings
string[] tokens = Console.ReadLine().Split();

//Parse element 0
int a = int.Parse(tokens[0]);

//Parse element 1
int b = int.Parse(tokens[1]);