Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
which namespace is avaible and how should i use it.
Posted
Comments
Manoj K Bhoir 24-Nov-11 9:13am    
You have to Use a NameSpace System.Diagnostics.Process
and then Just write one line of code :
Process.Start("Notepad.exe");
[no name] 25-Nov-11 1:21am    
thanq

For opening notepad use :
C#
Process.Start("notepad.exe");


More information here : http://msdn.microsoft.com/fr-fr/library/53ezey2s%28v=vs.80%29.aspx[^]
 
Share this answer
 
System.Diagnostics namespace:
C#
Process.Start("notepad.exe");
 
Share this answer
 
C#
System.Diagnostics.Process.Start("notepad.exe")
 
Share this answer
 
v2
do as below

C#
System.Diagnostics.ProcessStartInfo notepadLog = new
System.Diagnostics.ProcessStartInfo("notepad.exe", "c:\\myLogFile.xml");

System.Diagnostics.Process.Start(notepadLog);
 
Share this answer
 
Above all ways are correct, but if you want more control on process you have launch, then use this.

Process process = new Process();

process.StartInfo.FileName   = "notepad.exe";
process.StartInfo.Arguments = "ProcessStart.cs";

process.Start();
 
Share this answer
 
try this
System.Diagnostics.Process.Start("notepad.exe")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900