語言

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

定義

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

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

參數

key
String

找到的關鍵。

value
Object

當此方法回傳時,包含與指定鍵相關聯的值,若找到該鍵;否則,參數類型的 value 預設值。 這個參數會未初始化傳遞。

傳回

true 若實 HttpRequestOptions 例包含具有指定鍵數的元素;否則, false。

適用於