AppendPath.Program.Main C# (CSharp) 메소드

Main() 정적인 개인적인 메소드

static private Main ( string args ) : void
args string
리턴 void
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("You must specify the name of the path you would like to append");
                return;
            }
            var path = Environment.GetEnvironmentVariable("PATH");
            Environment.SetEnvironmentVariable("PATH", path + ";" + args[0], EnvironmentVariableTarget.Machine);
        }
Program