HttpHeadersNonValidated.IReadOnlyDictionary<String,HeaderStringValues>.TryGetValue Метод

Определение

Получает значение, связанное с указанным ключом.

 virtual bool System.Collections.Generic.IReadOnlyDictionary<System.String,System.Net.Http.Headers.HeaderStringValues>.TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::Net::Http::Headers::HeaderStringValues % value) = System::Collections::Generic::IReadOnlyDictionary<System::String ^, System::Net::Http::Headers::HeaderStringValues>::TryGetValue;
bool IReadOnlyDictionary<string,HeaderStringValues>.TryGetValue (string key, out System.Net.Http.Headers.HeaderStringValues value);
abstract member System.Collections.Generic.IReadOnlyDictionary<System.String,System.Net.Http.Headers.HeaderStringValues>.TryGetValue : string * HeaderStringValues -> bool
override this.System.Collections.Generic.IReadOnlyDictionary<System.String,System.Net.Http.Headers.HeaderStringValues>.TryGetValue : string * HeaderStringValues -> bool
Function TryGetValue (key As String, ByRef value As HeaderStringValues) As Boolean Implements IReadOnlyDictionary(Of String, HeaderStringValues).TryGetValue

Параметры

key
String

Искомый ключ.

value
HeaderStringValues

При возврате этого метода содержит значение, связанное с указанным ключом, если ключ найден; в противном случае содержит значение HeaderStringValuesпо умолчанию . Этот параметр передается неинициализированным.

Возвращаемое значение

true Значение , если коллекция содержит указанный заголовок; в противном случае — false.

Применяется к