Artemis.Engine.GameConstants.ReadBool C# (CSharp) Méthode

ReadBool() private méthode

Read a boolean value from a string in the xml file.
private ReadBool ( string s, bool defaultVal ) : bool
s string
defaultVal bool
Résultat bool
        private bool ReadBool(string s, bool defaultVal)
        {
            try { return Convert.ToBoolean(s); }
            catch (FormatException) { return defaultVal; }
        }