Question

I want to have my program execute a bunch of commands on load-time and this is in C# btw, but it's a console program, how can I do that?

Was it helpful?

Solution

If you are trying to execute external applications from within your C# console application, see the ProcessStartInfo and Process class.

Example:

Process.Start("IExplore.exe", "www.google.com");

// -- OR --
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
startInfo.Arguments = "www.google.com";
Process.Start(startInfo);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top