[英]Open another program config file C#
I have program A windows application and program B another windows application. 我有程序A Windows应用程序和程序B另一个Windows应用程序。 In program BI need to open program A config file.
在程序BI中需要打开程序A配置文件。 (App.config) I want to open that in a note pad.
(App.config)我想在记事本中打开它。 How can I do this?
我怎样才能做到这一点?
您可以使用Process.Start
方法启动notepad.exe
并指定文件的路径:
Process.Start("notepad.exe", "c:\path_to_a\app.config");
Very Simple , 很简单 ,
string filename = "C:\Users\Documents\Visual Studio 2010\Projects\myproject\app.config";
Start new process 开始新的流程
Process.Start("notepad.exe",filename);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.