我想从控制台读取行直到 EOF。我想出了这个解决方案,但我不知道它是否正确。
String line; while ((line = Console.ReadLine()) != null) { }
c# console input stream eof
c# ×1
console ×1
eof ×1
input ×1
stream ×1