How can you set a default input value in a .net console app?
Here is some make-believe code:
Console.Write("Enter weekly cost: ");
string inp
Here's a simple solution:
public static string ConsoleReadLineWithDefault(string defaultValue)
{
System.Windows.Forms.SendKeys.SendWait(defaultValue);
return Console.ReadLine();
}
It's not complete however. Some characters in the SendWait input string have special meaning so you have to escape them (eg. +, (, ), etc.) See: http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx for a complete description.