IQueryCollection.Item[String] Property

Definition

Gets the value with the specified key.

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

Parameters

key
String

The key of the value to get.

Property Value

StringValues

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

Exceptions

key is null.

Remarks

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

Applies to