Dela via


StringWithQualityHeaderValueComparer.Compare Method

Definition

Compares two StringWithQualityHeaderValue based on their quality value (a.k.a their "q-value"). Values with identical q-values are considered equal (i.e the result is 0) with the exception of wild-card values (i.e. a value of "*") which are considered less than non-wild-card values. This allows to sort a sequence of StringWithQualityHeaderValue following their q-values ending up with any wild-cards at the end.

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

Parameters

stringWithQuality1
StringWithQualityHeaderValue

The first value to compare.

stringWithQuality2
StringWithQualityHeaderValue

The second value to compare

Returns

The result of the comparison.

Implements

Applies to