HttpNameValueHeaderValue HttpNameValueHeaderValue HttpNameValueHeaderValue HttpNameValueHeaderValue 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// You can use this class in JavaScript.
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) 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)// You can use this method in JavaScript.
Parameters
name
PlatForm::String String String String

The name to be used.

See Also

HttpNameValueHeaderValue(String, String) 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)// You can use this method in JavaScript.
Parameters
name
PlatForm::String String String String

The name to be used.

value
PlatForm::String String String String

The value to associate with the name.

See Also

Properties

Name 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// You can use this property in JavaScript.
Value
PlatForm::String string string string

The name used in the HttpNameValueHeaderValue object.

Value 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// You can use this property in JavaScript.
Value
PlatForm::String string string string

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

Methods

Parse(String) 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// You can use this method in JavaScript.
Parameters
input
PlatForm::String String String String

A string that represents the name and value.

Returns

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() ToString()

Returns a string that represents the current HttpNameValueHeaderValue object.

public : PlatForm::String ToString()public string ToString()Public Function ToString() As string// You can use this method in JavaScript.
Returns
PlatForm::String string string string

A string that represents the current object.

TryParse(String, HttpNameValueHeaderValue) 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// You can use this method in JavaScript.
Parameters
input
PlatForm::String String String String

The string to validate.

Returns
PlatForm::Boolean bool bool bool

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