I have a C# Application that has a GUI and has its output type set as Windows Application. I would also like to invoke it from the command line (via parameters) and thus it needs to also be a Console Application.
Is there a way to get my application to run both as a Windows Application and as a Console Application?
Is there a way to set this at run time or is it a compile time setting?
You can attach the console. Make the code in Program.cs look like this: