shell execute command in C# code example

Example: c# execute shell command

System.Diagnostics.ProcessStartInfo process = new System.Diagnostics.ProcessStartInfo();
process.UseShellExecute = false;
process.WorkingDirectory = worikng_path;
process.FileName = command;
process.Arguments = command_arguments;
process.RedirectStandardOutput = true;

System.Diagnostics.Process cmd =  System.Diagnostics.Process.Start(process);
// waiting to complete 
cmd.WaitForExit();