共用方式為


EntityTagHeaderValue.Compare(EntityTagHeaderValue, Boolean) 方法

定義

比較另一個 EntityTagHeaderValue ,以查看它們是否符合 RFC 規格 (https://tools.ietf.org/html/rfc7232#section-2.3.2) 。

public:
 bool Compare(Microsoft::Net::Http::Headers::EntityTagHeaderValue ^ other, bool useStrongComparison);
public bool Compare (Microsoft.Net.Http.Headers.EntityTagHeaderValue other, bool useStrongComparison);
public bool Compare (Microsoft.Net.Http.Headers.EntityTagHeaderValue? other, bool useStrongComparison);
member this.Compare : Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> bool
Public Function Compare (other As EntityTagHeaderValue, useStrongComparison As Boolean) As Boolean

參數

other
EntityTagHeaderValue

要比較的另一個 EntityTagHeaderValue

useStrongComparison
Boolean

true 使用強式比較, false 使用弱式比較

傳回

trueEntityTagHeaderValue如果符合指定的比較類型,則為 , false 如果另一個值為 Null 或比較失敗則為 。

適用於