打开另一个程序配置文件c#
本文关键字:配置文件 程序 另一个 | 更新日期: 2023-09-27 17:51:15
程序A是windows应用程序,程序B是另一个windows应用程序。在程序B中,我需要打开程序A配置文件。(App.config)我想在记事本中打开它。我该怎么做呢?
您可以使用Process.Start
方法来启动notepad.exe
并指定文件的路径:
Process.Start("notepad.exe", "c:'path_to_a'app.config");
非常简单,
string filename = "C:'Users'Documents'Visual Studio 2010'Projects'myproject'app.config";
启动新进程
Process.Start("notepad.exe",filename);