IRequestCookieCollection.Item[String] 屬性

定義

取得具有指定索引鍵的值。

public:
 property System::String ^ default[System::String ^] { System::String ^ get(System::String ^ key); };
public string this[string key] { get; }
public string? this[string key] { get; }
member this.Item(string) : string
Default Public ReadOnly Property Item(key As String) As String

參數

key
String

要取得之值的索引鍵。

屬性值

具有指定索引鍵的專案,如果索引鍵不存在,則 null 為 。

例外狀況

key 是 null。

備註

IRequestCookieCollection 具有與 不同的索引子合約 IDictionary<TKey,TValue> ,因為它會針對遺漏的專案傳回 ,而不是擲回 null 例外狀況。

適用於