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

適用於