我只需要能够循环控制台应用程序。我的意思是:
program start:
display text
get input
do calculation
display result
display text
get input.
REPEAT PROCESS INFINATE NUMBER OF TIMES UNTIL THE USER EXITS THE APPLICATION.
program end.
我希望这是有道理的。谁能解释一下我将如何去做这件事?谢谢:)
最佳答案
Console.WriteLine("bla bla - enter xx to exit");
string line;
while((line = Console.ReadLine()) != "xx")
{
string result = DoSomethingWithThis(line);
Console.WriteLine(result);
}
关于c# - 如何循环控制台应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1754282/