StringWithQualityHeaderValue Class

Definition

Represents a string header value with an optional quality.

C#
public class StringWithQualityHeaderValue
C#
public class StringWithQualityHeaderValue : ICloneable
Inheritance
StringWithQualityHeaderValue
Implements

Remarks

The StringWithQualityHeaderValue class provides support for strings with a quality factor used in some headers as defined in RFC 2616 by the IETF.

Quality factors allow the user agent to indicate the relative degree of preference for various options in various headers including the Accept, Accept-Charset, Accept-Encoding, and Accept-Language headers. Quality uses a scale from 0 to 1. The default value is q=1.

Constructors

Properties

Quality

Gets the quality factor from the StringWithQualityHeaderValue object.

Value

Gets the string value from the StringWithQualityHeaderValue object.

Methods

Equals(Object)

Determines whether the specified Object is equal to the current StringWithQualityHeaderValue object.

GetHashCode()

Serves as a hash function for an StringWithQualityHeaderValue object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Parse(String)

Converts a string to an StringWithQualityHeaderValue instance.

ToString()

Returns a string that represents the current StringWithQualityHeaderValue object.

TryParse(String, StringWithQualityHeaderValue)

Determines whether a string is valid StringWithQualityHeaderValue information.

Explicit Interface Implementations

ICloneable.Clone()

Creates a new object that is a copy of the current StringWithQualityHeaderValue instance.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0