I am trying to show text in a console launched from the click button. I think I need to input the console’s path where I have put the question marks Process.Start(“????”). How do I find the console path?
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Process.Start("????");
Console.WriteLine("Adam");
Console.Read();
}
}
What you need to do is grab the console from the windows API. This will create a new instance of a console application that can output and read etc.