Open a file with Notepad in C#

前端 未结 6 604
春和景丽
春和景丽 2020-11-28 06:35

How I open a file in c#? I don\'t mean reading it by textreader and readline(). I mean open it as an independent file in notepad.

6条回答
  •  广开言路
    2020-11-28 07:03

    this will open the file with the default windows program (notepad if you haven't changed it);

    Process.Start(@"c:\myfile.txt")
    

提交回复
热议问题