ActivityTagsCollection.TryGetValue(String, Object) 方法

定義

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

public:
 virtual bool TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::Object ^ % value);
public bool TryGetValue (string key, out object? value);
abstract member TryGetValue : string * obj -> bool
override this.TryGetValue : string * obj -> bool
Public Function TryGetValue (key As String, ByRef value As Object) As Boolean

參數

key
String

標籤索引鍵。

value
Object

標籤值。

傳回

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

適用於