到Console.ReadLine("默认文本编辑文本在线") [英] Console.ReadLine("Default Text Editable Text On Line")

查看:128
本文介绍了到Console.ReadLine("默认文本编辑文本在线")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有实现这一目标的方法是什么?我想通过一些文字,并把它显示在输入行 - 而不是输入您的姓名:其中,光标> ,我想输入您的姓名:默认可编辑的文字<光标>

Is there way of achieving this? I want to pass some text and have it appear on the input line -- instead of "Enter your Name:<cursor>", I want "Enter your Name:Default Editable Text<cursor>"

推荐答案

好了,找到了。对不起。

Ok, found it. Sorry.

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

这篇关于到Console.ReadLine(&QUOT;默认文本编辑文本在线&QUOT;)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆