c# - 控制台.ReadLine ("Default Text Editable Text On Line")

标签 c# .net console console-application

有什么办法可以实现吗?我想传递一些文本并让它出现在输入行上——而不是“输入您的姓名:”,我想要“输入您的姓名:默认可编辑文本

最佳答案

好的,找到了。对不起。

static void Main(string[] args)
{
    Console.Write("Your editable text:");
    SendKeys.SendWait("hello"); //hello text will be editable :)
    Console.ReadLine();
}

关于c# - 控制台.ReadLine ("Default Text Editable Text On Line"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8962691/

相关文章:

C 控制台 API 窗口

c - Linux 控制台键盘处理程序

c# - 无法在 Visual Studio 2008 的代码隐藏中引用 ASP.NET 控件

c# - SignalR Core - 从 WebAPI 检查连接状态

c# - Thread.Sleep 阻塞并行执行任务

asp.net - http ://<domain>/cache/<32-digit-alphanumeric-key> 类型的未知 http 请求

c# - Visual Studio 2010 (C#) 中 ReportDocument 的 SetDataSource 错误

.net - Stylecop 设置在什么时候不再有用并开始变得烦人?

c# - 如何在 C# 中使用 StreamReader(新手)

networking - 如何呈现远程 ncurses 控制台?