IRequestCookieCollection.Item[String] Property

Definition

Gets the value with the specified key.

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

Parameters

key
String

The key of the value to get.

Property Value

The element with the specified key, or null if the key is not present.

Exceptions

key is null.

Remarks

IRequestCookieCollection has a different indexer contract than IDictionary<TKey,TValue>, as it will return null for missing entries rather than throwing an Exception.

Applies to