StringWithQualityHeaderValueComparer.Compare 方法

定义

根据两 StringWithQualityHeaderValue 者的质量值 ((即“q 值”) )进行比较。 具有相同 q 值的值被视为相等 (即结果为 0) ,但 (卡值除外,即“*”) 的值被视为小于非卡值。 这允许对 q 值结尾处的任何通配符进行排序的序列 StringWithQualityHeaderValue

public:
 virtual int Compare(Microsoft::Net::Http::Headers::StringWithQualityHeaderValue ^ stringWithQuality1, Microsoft::Net::Http::Headers::StringWithQualityHeaderValue ^ stringWithQuality2);
public int Compare (Microsoft.Net.Http.Headers.StringWithQualityHeaderValue stringWithQuality1, Microsoft.Net.Http.Headers.StringWithQualityHeaderValue stringWithQuality2);
public int Compare (Microsoft.Net.Http.Headers.StringWithQualityHeaderValue? stringWithQuality1, Microsoft.Net.Http.Headers.StringWithQualityHeaderValue? stringWithQuality2);
abstract member Compare : Microsoft.Net.Http.Headers.StringWithQualityHeaderValue * Microsoft.Net.Http.Headers.StringWithQualityHeaderValue -> int
override this.Compare : Microsoft.Net.Http.Headers.StringWithQualityHeaderValue * Microsoft.Net.Http.Headers.StringWithQualityHeaderValue -> int
Public Function Compare (stringWithQuality1 As StringWithQualityHeaderValue, stringWithQuality2 As StringWithQualityHeaderValue) As Integer

参数

stringWithQuality1
StringWithQualityHeaderValue

要比较的第一个值。

stringWithQuality2
StringWithQualityHeaderValue

要比较的第二个值

返回

比较的结果。

实现

适用于