C#: Is it possible to have a single application behave as Console or Windows application depending on switches?

前端 未结 7 2091
无人及你
无人及你 2020-12-09 21:25

I have a simple application that I would like to sort of automate via switches. But when I do run it via switches I don\'t really want a user interface showing. I just want

相关标签:
7条回答
  • 2020-12-09 22:26

    They are two different paradigms, I don't think that using a command line switch like this is a good idea. Why not build the core logic into a console application and then call that from the GUI when needed? This would nicely separate the UI from the implementation but would still provide a way to use the Console app stand alone when needed.

    0 讨论(0)
提交回复
热议问题