How do I start a process from C#?

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

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

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 04:01

    class ProcessStart
    {
        static void Main(string[] args)
        {
            Process notePad = new Process();
    
            notePad.StartInfo.FileName   = "notepad.exe";
            notePad.StartInfo.Arguments = "ProcessStart.cs";
    
            notePad.Start();
        }
    }
    

提交回复
热议问题