protected string this[enu.QS index] { get { try { return(l_QSItems[Convert.ToInt32(index)].ToString()); } catch (Exception ex) { return(""); } } set { ValidateStringSize(index.ToString(), value); l_QSItems[Convert.ToInt32(index)] = value; SaveCookie(index, value); } }
protected string this[enu.QS index] { get { try { // index is an enum. It won't implicitly cast to int as in // C/C++ (or, I infer, VB.NET), but an explicit cast is fine. return(l_QSItems[(int)index].ToString()); } catch (Exception ex) { return(""); } } set { ValidateStringSize(index.ToString(), value); l_QSItems[(int)index] = value; } }