/// <summary> /// 获取指定键值(int) /// </summary> /// <param name="key">key</param> /// <param name="defaultValue">缺省值</param> /// <returns></returns> public int this[string key, int defaultValue] { get { string value = null; if (_queryStringDictionary.TryGetValue(key, out value)) { if (StringValidate.IsNumber(value)) { return(Int32.Parse(value)); } } return(defaultValue); } }