Share via


ReservationCollection.GetBestMatchingReservation(Int64) 方法

定義

在衍生類別中覆寫時,取得最符合指定大小的保留。

protected:
 long GetBestMatchingReservation(long size);
protected long GetBestMatchingReservation (long size);
member this.GetBestMatchingReservation : int64 -> int64
Protected Function GetBestMatchingReservation (size As Long) As Long

參數

size
Int64

必須符合的保留大小。

傳回

在集合中大於或等於指定大小的保留,如果沒有此類保留區時,則為 -1。

備註

從保留的空間將記錄附加到記錄順序時,通常會呼叫這個方法。 當它傳回時,便會從集合中移除傳回大小的保留區。 如果因故而實際上未存取保留的空間時,則應呼叫 ReservationMade 方法以確保 ReservationCollection 可精確表示記錄順序中的保留空間數量。

適用於