using System;
using System.Diagnostics;
namespace RunProcessStart
{
class RunProcessStart
{
static void Main(string[] args)
{
Console.WriteLine("Compiler");
String fileCS = @"c:\Dev\ConsoleTest\Program.cs";
try
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = @"c:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe";
startInfo.Arguments = fileCS;
proc.StartInfo = startInfo;
proc.Start();
proc.WaitForExit();
}
catch(Exception ex)
{
ex.ToString();
}
Console.ReadKey();
}
}
}