HttpCookiePairHeaderValue HttpCookiePairHeaderValue HttpCookiePairHeaderValue HttpCookiePairHeaderValue Class

Represents cookie information used in the Cookie HTTP header on an HTTP request.

Syntax

Declaration

public sealed class HttpCookiePairHeaderValuepublic sealed class HttpCookiePairHeaderValuePublic NotInheritable Class HttpCookiePairHeaderValuepublic sealed class HttpCookiePairHeaderValue

Remarks

The HttpCookiePairHeaderValue class represents cookie information used in the Cookie HTTP header on an HTTP request.

The Cookie property on the HttpRequestHeaderCollection returns an HttpCookiePairHeaderValueCollection that contains HttpCookiePairHeaderValue objects.

Constructors summary

Initializes a new instance of the HttpCookiePairHeaderValue class. with a cookie name.

Initializes a new instance of the HttpCookiePairHeaderValue class. with a cookie name and a value for the cookie.

Properties summary

Gets a token that represents the cookie name used in the Cookie HTTP header.

Gets or sets a value for the cookie used in the Cookie HTTP header.

Methods summary

Converts a string to an HttpCookiePairHeaderValue instance.

Returns a string that represents the current HttpCookiePairHeaderValue object.

Determines whether a string is valid HttpCookiePairHeaderValue information.

Constructors

  • HttpCookiePairHeaderValue(String)
    HttpCookiePairHeaderValue(String)
    HttpCookiePairHeaderValue(String)
    HttpCookiePairHeaderValue(String)

    Initializes a new instance of the HttpCookiePairHeaderValue class. with a cookie name.

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

    Parameters

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

      A token that represents the cookie name.

  • HttpCookiePairHeaderValue(String, String)
    HttpCookiePairHeaderValue(String, String)
    HttpCookiePairHeaderValue(String, String)
    HttpCookiePairHeaderValue(String, String)

    Initializes a new instance of the HttpCookiePairHeaderValue class. with a cookie name and a value for the cookie.

    public HttpCookiePairHeaderValue(String name, String value)public New(String name, String value)Public Sub New(name As String, value As String)public HttpCookiePairHeaderValue(String name, String value)

    Parameters

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

      A token that represents the cookie name.

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

      A value for the cookie.

Properties

  • Name
    Name
    Name
    Name

    Gets a token that represents the cookie name used in the Cookie HTTP header.

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

    Property Value

    • string
      string
      string
      string

      A token that represents the cookie name.

  • Value
    Value
    Value
    Value

    Gets or sets a value for the cookie used in the Cookie HTTP header.

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

    Property Value

    • string
      string
      string
      string

      A value for the cookie.

Methods

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

    Converts a string to an HttpCookiePairHeaderValue instance.

    public static HttpCookiePairHeaderValue Parse(String input)public static HttpCookiePairHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpCookiePairHeaderValuepublic static HttpCookiePairHeaderValue Parse(String input)

    Parameters

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

      A string that represents the cookie name and value in the Cookie HTTP header.

    Returns

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

    Returns a string that represents the current HttpCookiePairHeaderValue 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, HttpCookiePairHeaderValue)
    TryParse(String, HttpCookiePairHeaderValue)
    TryParse(String, HttpCookiePairHeaderValue)
    TryParse(String, HttpCookiePairHeaderValue)

    Determines whether a string is valid HttpCookiePairHeaderValue information.

    public static bool TryParse(String input, HttpCookiePairHeaderValue cookiePairHeaderValue)public static bool TryParse(String input, HttpCookiePairHeaderValue cookiePairHeaderValue)Public Static Function TryParse(input As String, cookiePairHeaderValue As HttpCookiePairHeaderValue) As boolpublic static bool TryParse(String input, HttpCookiePairHeaderValue cookiePairHeaderValue)

    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