/// <summary> /// Returns the number of keys in this Database /// </summary> /// <remarks> /// This method wraps the native ups_db_count function. /// <br /> /// You can specify UPS_SKIP_DUPLICATES if you do now want /// to include any duplicates in the count. /// </remarks> public Int64 GetCount(Transaction txn, int flags) { int st; Int64 count = 0; lock (this) { st = NativeMethods.GetCount(handle, txn != null ? txn.Handle : IntPtr.Zero, flags, out count); } if (st != 0) { throw new DatabaseException(st); } return(count); }