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 或比较失败,则为 。

适用于