HttpCookie.TryParse(String, HttpCookie) Método

Definição

Converte a representação de cadeia de caracteres especificada de um cookie em seu HttpCookie equivalente e retorna um valor que indica se a conversão foi bem-sucedida.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

Parâmetros

input
String

A representação de cadeia de caracteres de um cookie.The string representation of a cookie.

result
HttpCookie

Se a conversão for bem-sucedida, conterá o valor HttpCookie equivalente ao cookie contido em input.If the conversion succeeded, contains the HttpCookie value equivalent to the cookie contained in input. Caso a conversão falhe, result é null.If the conversion failed, result is null. A conversão falhará se o parâmetro input for null ou vazio ou se um nome de cookie não puder ser determinado input.The conversion fails if the input parameter is null or empty or if a cookie name can't be determined from input. O valor desse parâmetro é substituído pelo método; o parâmetro é passado por referência e definido como nulo assim que o método é inserido.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.

Retornos

Boolean

true caso input tenha sido convertido com êxito; do contrário, false.true if input was converted successfully; otherwise, false.

Aplica-se a