/DualMode-Sample

Dual launchable app as a console or gui application

Primary LanguageC#The UnlicenseUnlicense

Dual-Mode Sample

Dual launchable app as a console or gui application.

Based on the discussions found on StackOverflow this sample gives you the ability to launch both as a console app primarily, but also as a gui app intuitively without any compromise*.

Side Effects

*You do get a flash of a console window when you launch the gui, but it is a minor detail, considering that all console usage works as expected. (With the exception of the gui launch mode, perhaps)

Other Options

Other ways of achieving this is to just have two applications, and share code between your console and your gui application.