Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Console.ReadLine("Default Text Editable Text On Line")

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>"

like image 385
Mark Robbins Avatar asked Jan 22 '12 16:01

Mark Robbins


1 Answers

Ok, found it. Sorry.

static void Main(string[] args)
{
    Console.Write("Your editable text:");
    SendKeys.SendWait("hello"); //hello text will be editable :)
    Console.ReadLine();
}
like image 78
Mark Robbins Avatar answered Oct 23 '22 02:10

Mark Robbins