Http​Name​Value​Header​Value Http​Name​Value​Header​Value Http​Name​Value​Header​Value Class

Definition

Represents name and value information used in a number of HTTP headers.

public : sealed class HttpNameValueHeaderValue : IStringable, IHttpNameValueHeaderValuepublic sealed class HttpNameValueHeaderValue : IStringable, IHttpNameValueHeaderValuePublic NotInheritable Class HttpNameValueHeaderValue Implements IStringable, IHttpNameValueHeaderValue
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The HttpNameValueHeaderValue class provides support for name/value pairs used in various headers

Constructors

HttpNameValueHeaderValue(String) HttpNameValueHeaderValue(String) HttpNameValueHeaderValue(String)

Initializes a new instance of the HttpNameValueHeaderValue class. with a name.

public : HttpNameValueHeaderValue(PlatForm::String name)public HttpNameValueHeaderValue(String name)Public Sub New(name As String)
Parameters
name
PlatForm::String String String

The name to be used.

Attributes
See Also

HttpNameValueHeaderValue(String, String) HttpNameValueHeaderValue(String, String) HttpNameValueHeaderValue(String, String)

Initializes a new instance of the HttpNameValueHeaderValue class. with a name and value.

public : HttpNameValueHeaderValue(PlatForm::String name, PlatForm::String value)public HttpNameValueHeaderValue(String name, String value)Public Sub New(name As String, value As String)
Parameters
name
PlatForm::String String String

The name to be used.

value
PlatForm::String String String

The value to associate with the name.

Attributes
See Also

Properties

Name Name Name

Gets the name used in the HttpNameValueHeaderValue object.

public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string
Value
PlatForm::String string string

The name used in the HttpNameValueHeaderValue object.

Attributes

Value Value Value

Gets or sets the value associated with a name used in the HttpNameValueHeaderValue object.

public : PlatForm::String Value { get; set; }public string Value { get; set; }Public ReadWrite Property Value As string
Value
PlatForm::String string string

The value associated with a name used in the HttpNameValueHeaderValue object.

Attributes

Methods

Parse(String) Parse(String) Parse(String)

Converts a string to an HttpNameValueHeaderValue instance.

public : static HttpNameValueHeaderValue Parse(PlatForm::String input)public static HttpNameValueHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpNameValueHeaderValue
Parameters
input
PlatForm::String String String

A string that represents the name and value.

Returns
Attributes

Remarks

Below are the exceptions that this function throws.

E_INVALIDARG

The input parameter is null (Nothing in Visual Basic).

The input parameter is not valid name and value information.

ToString() ToString() ToString()

Returns a string that represents the current HttpNameValueHeaderValue object.

public : PlatForm::String ToString()public string ToString()Public Function ToString() As string
Returns
PlatForm::String string string

A string that represents the current object.

Attributes

TryParse(String, HttpNameValueHeaderValue) TryParse(String, HttpNameValueHeaderValue) TryParse(String, HttpNameValueHeaderValue)

Determines whether a string is valid HttpNameValueHeaderValue information.

public : static PlatForm::Boolean TryParse(PlatForm::String input, HttpNameValueHeaderValue nameValueHeaderValue)public static bool TryParse(String input, HttpNameValueHeaderValue nameValueHeaderValue)Public Static Function TryParse(input As String, nameValueHeaderValue As HttpNameValueHeaderValue) As bool
Parameters
input
PlatForm::String String String

The string to validate.

Returns
PlatForm::Boolean bool bool

true if input is valid HttpNameValueHeaderValue information; otherwise, false.

Attributes