HttpRequestOptions.IDictionary<String,Object>.TryGetValue 方法

定義

取得與指定索引鍵關聯的值。

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

參數

key
String

要取得之值的索引鍵。

value
Object

這個方法傳回時,如果找到索引鍵,則包含與指定索引鍵相關聯的值,否則為 value 參數類型的預設值。 這個參數會以未初始化的狀態傳遞。

傳回

如果 true 包含具有指定索引鍵的項目,則為 Dictionary<TKey,TValue>,否則為 false

備註

這個成員是明確介面成員實作, 只有在 HttpRequestOptions 執行個體轉換成 IDictionary<TKey,TValue> 介面時,才能使用這個成員。

適用於