WPF / Console Hybrid Application

后端 未结 4 1974
长发绾君心
长发绾君心 2021-02-13 01:27

I writing an application what can either be run on the command line, or with a WPF UI.

[STAThread]
static void Main(string[] args)
{
    // Does magic parse args         


        
4条回答
  •  天命终不由人
    2021-02-13 02:23

    I know I'm a little late to the party, but figured I could toss in my two cents. You could always keep it as a console application, and then hide the console as per this answer (https://stackoverflow.com/a/3571628/1059953). There is a moment of the console being displayed, then it disappears and the window shows up.

提交回复
热议问题