HttpCookie.TryParse(String, HttpCookie) メソッド

定義

指定した文字列形式の Cookie を、等価の HttpCookie に変換し、変換に成功したかどうかを示す値を返します。

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

パラメーター

input
String

Cookie の文字列形式。

result
HttpCookie

変換に成功した場合、input に格納された Cookie と等価の HttpCookie の値を格納します。 変換に失敗した場合は、 resultnull になります。 input パラメーターが null または空の場合、または input から Cookie 名を特定できない場合、変換は失敗します。 このパラメーターの値は、メソッドによって上書きされます。パラメーターが参照によって渡され、メソッドが入力されるとすぐに null に設定されます。

戻り値

input が正常に変換された場合は true。それ以外の場合は false

適用対象