我想编写一个具有不同行为的控制台应用程序,具体取决于输入是来自键盘还是来自文件.
可能吗?在C#中最优雅的方法是什么?
c# console redirect stdin
c# ×1
console ×1
redirect ×1
stdin ×1