Build.Shell.run C# (CSharp) Метод

run() публичный статический Метод

public static run ( string commandName, string arguments = "" ) : void
commandName string
arguments string
Результат void
        public static void run(string commandName, string arguments = "")
        {
            var process = new Process
            {
                StartInfo =
                {
                    FileName = commandName,
                    Arguments = arguments
                }
            };

            process.Start();
            process.WaitForExit();

            if (process.ExitCode != 0)
                throw new Exception($"Error executing command: {commandName} {arguments}");
        }