How do I start a process from C#?

后端 未结 12 2019
北荒
北荒 2020-11-22 03:38

How do I start a process, such as launching a URL when the user clicks a button?

12条回答
  •  [愿得一人]
    2020-11-22 03:51

    You can use this syntax for running any application:

    System.Diagnostics.Process.Start("Example.exe");
    

    And the same one for a URL. Just write your URL between this ().

    Example:

    System.Diagnostics.Process.Start("http://www.google.com");
    

提交回复
热议问题