BatchExperiment.Program.GetCommandLineArg C# (CSharp) Method

GetCommandLineArg() private static method

private static GetCommandLineArg ( bool defaultValue ) : bool
defaultValue bool
return bool
        private static bool GetCommandLineArg(bool defaultValue)
        {
            string line = Console.ReadLine();
            line = line.ToLower();
            if (line == "yes" || line == "y" || line == "true")
                return true;
            if (line == "no" || line == "n" || line == "false")
                return false;
            return defaultValue;
        }

Same methods

Program::GetCommandLineArg ( int defaultValue ) : int