HttpCookie.TryParse(String, HttpCookie) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的 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
餅乾的串狀表示。
- result
- HttpCookie
若轉換成功,包含 HttpCookie 與 中 inputCookie 等價的值。 若轉換失敗,則 result 為 null。 若 input 參數為 null 空或無法從中判定 inputcookie 名稱,則轉換失敗。 此參數的值會被方法覆蓋;參數會透過參考傳遞,並在方法輸入後立即設為空值。
傳回
true若input成功轉換;否則,。 false