gpt4 book ai didi

c# - 控制台窗口一直关闭,即使在我输入其他语句后也是如此

转载 作者:太空宇宙 更新时间:2023-11-03 18:38:23 25 4
gpt4 key购买 nike

我是编程新手,按照传统做法,我尝试用 C# 创建一个“hello world”程序;但是,一旦我运行该程序,它就会关闭。

这是我的代码:

main()

console.writeline("hello world");
console.writeline("enter name");
console.writeline("where is the frikin console");

这真的很烦人,我知道这对其他用户来说可能很简单,但我如何让窗口保持打开状态。

最佳答案

在程序末尾使用 Console.ReadLine();Console.ReadKey(); 等待返回键或任何键。

关于c# - 控制台窗口一直关闭,即使在我输入其他语句后也是如此,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11883197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com