Guid GetGuid (int i)
{
object value = GetValue (i);
if (!(value is Guid)) {
if (value is DBNull) throw new SqlNullValueException ();
throw new InvalidCastException ("Type is " + value.GetType ().ToString ());
}
return (Guid) value;
}