SqlDouble GetSqlDouble (int i) { object value = GetSqlValue (i); if (!(value is SqlDouble)) throw new InvalidCastException ("Type is " + value.GetType ().ToString ()); return (SqlDouble) value; }