fCraft.Config.ValidateBool C# (CSharp) Method

ValidateBool() private method

private ValidateBool ( string key, string value ) : bool
key string
value string
return bool
        bool ValidateBool( string key, string value ) {
            bool temp;
            if( Boolean.TryParse( value, out temp ) ) {
                settings[key] = temp.ToString();
                return true;
            } else {
                Log( "Config.SetValue: Specified value for {0} could not be parsed. Expected 'true' or 'false'. Using default ({1}).", LogType.Warning,
                                    key, settings[key] );
                return false;
            }
        }