BlueCollar.Dashboard.HandlerHelper.QueryIntValue C# (CSharp) Method

QueryIntValue() public method

Gets an integer value from the query string.
public QueryIntValue ( string key ) : int?
key string The key to get the value from.
return int?
        public int? QueryIntValue(string key)
        {
            int? result = null;

            if (!string.IsNullOrEmpty(this.Handler.QueryString[key]))
            {
                try
                {
                    result = Convert.ToInt32(this.Handler.QueryString[key], CultureInfo.InvariantCulture);
                }
                catch (FormatException)
                {
                }
                catch (OverflowException)
                {
                }
            }

            return result;
        }