Share via


SetCookieHeaderValue.MaxAge Property

Definition

Gets or sets a value for the Max-Age cookie attribute.

The Max-Age attribute indicates the maximum lifetime of the cookie, represented as the number of seconds until the cookie expires.

public:
 property Nullable<TimeSpan> MaxAge { Nullable<TimeSpan> get(); void set(Nullable<TimeSpan> value); };
public TimeSpan? MaxAge { get; set; }
member this.MaxAge : Nullable<TimeSpan> with get, set
Public Property MaxAge As Nullable(Of TimeSpan)

Property Value

Remarks

See https://tools.ietf.org/html/rfc6265#section-4.1.2.2.

Applies to