HttpNameValueHeaderValue HttpNameValueHeaderValue HttpNameValueHeaderValue HttpNameValueHeaderValue Class

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

Syntax

Declaration

public sealed class HttpNameValueHeaderValuepublic sealed class HttpNameValueHeaderValuePublic NotInheritable Class HttpNameValueHeaderValuepublic sealed class HttpNameValueHeaderValue

Remarks

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

Constructors summary

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

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

Properties summary

Gets the name used in the HttpNameValueHeaderValue object.

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

Methods summary

Converts a string to an HttpNameValueHeaderValue instance.

Returns a string that represents the current HttpNameValueHeaderValue object.

Determines whether a string is valid HttpNameValueHeaderValue information.

Constructors

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

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

    public HttpNameValueHeaderValue(String name)public New(String name)Public Sub New(name As String)public HttpNameValueHeaderValue(String name)

    Parameters

    • name
      System.String
      System.String
      System.String
      System.String

      The name to be used.

  • 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(String name, String value)public New(String name, String value)Public Sub New(name As String, value As String)public HttpNameValueHeaderValue(String name, String value)

    Parameters

    • name
      System.String
      System.String
      System.String
      System.String

      The name to be used.

    • value
      System.String
      System.String
      System.String
      System.String

      The value to associate with the name.

Properties

  • Name
    Name
    Name
    Name

    Gets the name used in the HttpNameValueHeaderValue object.

    public string Name { get; }public string Name { get; }Public ReadOnly Property Name As stringpublic string Name { get; }

    Property Value

  • Value
    Value
    Value
    Value

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

    public string Value { get; set; }public string Value { get; set; }Public ReadWrite Property Value As stringpublic string Value { get; set; }

    Property Value

Methods

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

    Converts a string to an HttpNameValueHeaderValue instance.

    public static HttpNameValueHeaderValue Parse(String input)public static HttpNameValueHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpNameValueHeaderValuepublic static HttpNameValueHeaderValue Parse(String input)

    Parameters

    • input
      System.String
      System.String
      System.String
      System.String

      A string that represents the name and value.

    Returns

  • ToString()
    ToString()
    ToString()
    ToString()

    Returns a string that represents the current HttpNameValueHeaderValue object.

    public string ToString()public string ToString()Public Function ToString() As stringpublic string ToString()

    Returns

    • 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 bool TryParse(String input, HttpNameValueHeaderValue nameValueHeaderValue)public static bool TryParse(String input, HttpNameValueHeaderValue nameValueHeaderValue)Public Static Function TryParse(input As String, nameValueHeaderValue As HttpNameValueHeaderValue) As boolpublic static bool TryParse(String input, HttpNameValueHeaderValue nameValueHeaderValue)

    Parameters

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Web.Http.Headers.dll