public static void Main(string[] argv) { //http://stackoverflow.com/questions/493536/can-one-executable-be-both-a-console-and-gui-application if (argv.Length == 0) { LaunchAsGui(); } else { var args = new MainArgs(argv, help: true, version: "1.0.0", exit: true); if (args.OptGui) { LaunchAsGui(); } else if (args.OptCli) { RunInConsole(args); } } }
private static void RunInConsole(MainArgs args) { Console.WriteLine("I'm a console App"); }