SharpCifs.Config.GetInt C# (CSharp) Method

GetInt() public static method

Retrieve an int.
Retrieve an int. If the property is not found, -1 is returned.
public static GetInt ( string key ) : int
key string
return int
        public static int GetInt(string key)
        {
            string s = (string)_prp.GetProperty(key);
            int result = -1;
            if (s != null)
            {
                try
                {
                    result = Convert.ToInt32(s);
                }
                catch (FormatException nfe)
                {
                    if (_log.Level > 0)
                    {
                        Runtime.PrintStackTrace(nfe, _log);
                    }
                }
            }
            return result;
        }

Same methods

Config::GetInt ( string key, int def ) : int