Bootstrapper.Program.ParseArgs C# (CSharp) Method

ParseArgs() public static method

public static ParseArgs ( ) : string
return string
        public static string ParseArgs()
        {
            string args = Environment.CommandLine.TrimEnd();
            // If the command line starts with quotes, then look for the first occurence of a quote following it. 
            int index = args.StartsWith("\"") ? args.IndexOf("\"", 1) : args.IndexOf(" ");
            if (index == -1 || index >= args.Length - 1)
            {
                return String.Empty;
            }
            return args.Substring(index + 1).Trim();
        }