Muokkaa

Jaa


HttpCookie.TryParse(String, HttpCookie) Method

Definition

Converts the specified string representation of a cookie into its HttpCookie equivalent and returns a value that indicates whether the conversion succeeded.

public:
 static bool TryParse(System::String ^ input, [Runtime::InteropServices::Out] System::Web::HttpCookie ^ % result);
public static bool TryParse (string input, out System.Web.HttpCookie result);
static member TryParse : string * HttpCookie -> bool
Public Shared Function TryParse (input As String, ByRef result As HttpCookie) As Boolean

Parameters

input
String

The string representation of a cookie.

result
HttpCookie

If the conversion succeeded, contains the HttpCookie value equivalent to the cookie contained in input. If the conversion failed, result is null. The conversion fails if the input parameter is null or empty or if a cookie name can't be determined from input. This parameter's value is overwritten by the method; the parameter is passed by reference and set to null as soon as the method is entered.

Returns

true if input was converted successfully; otherwise, false.

Applies to