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 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(System.String)
    HttpCookiePairHeaderValue(System.String)
    HttpCookiePairHeaderValue(System.String)
    HttpCookiePairHeaderValue(System.String)

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

    public HttpCookiePairHeaderValue(System.String)public HttpCookiePairHeaderValue(System.String)Public Function HttpCookiePairHeaderValue(System.String) As

    Parameters

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

      A token that represents the cookie name.

  • HttpCookiePairHeaderValue(System.String,System.String)
    HttpCookiePairHeaderValue(System.String,System.String)
    HttpCookiePairHeaderValue(System.String,System.String)
    HttpCookiePairHeaderValue(System.String,System.String)

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

    public HttpCookiePairHeaderValue(System.String,System.String)public HttpCookiePairHeaderValue(System.String,System.String)Public Function HttpCookiePairHeaderValue(System.String,System.String) As

    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 string

    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 string

    Property Value

    • string
      string
      string
      string

      A value for the cookie.

Methods

  • Parse(System.String)
    Parse(System.String)
    Parse(System.String)
    Parse(System.String)

    Converts a string to an HttpCookiePairHeaderValue instance.

    public static HttpCookiePairHeaderValue Parse(System.String)public static HttpCookiePairHeaderValue Parse(System.String)Public Static Function Parse(System.String) As HttpCookiePairHeaderValue

    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 string

    Returns

    • string
      string
      string
      string

      A string that represents the current object.

  • TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue)

    Determines whether a string is valid HttpCookiePairHeaderValue information.

    public static bool TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue)public static bool TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue)Public Static Function TryParse(System.String,Windows.Web.Http.Headers.HttpCookiePairHeaderValue) As bool

    Parameters

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

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

Details

Assembly

Windows.Web.Http.Headers.dll