Tom
Tom

Reputation: 1373

Open another program config file C#

I have program A windows application and program B another windows application. In program B I need to open program A config file. (App.config) I want to open that in a note pad. How can I do this?

Upvotes: 0

Views: 184

Answers (2)

Shree Software
Shree Software

Reputation: 21

Very Simple ,

string filename = "C:\Users\Documents\Visual Studio 2010\Projects\myproject\app.config";

Start new process

Process.Start("notepad.exe",filename);

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038800

You could use the Process.Start method to launch notepad.exe and specify the path to the file:

Process.Start("notepad.exe", "c:\path_to_a\app.config");

Upvotes: 1

Related Questions