EventSource.GetTrait(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與指定鍵相關聯的特徵值。
public:
System::String ^ GetTrait(System::String ^ key);
public string GetTrait(string key);
public string? GetTrait(string key);
member this.GetTrait : string -> string
Public Function GetTrait (key As String) As String
參數
- key
- String
特質的關鍵是要獲得。
傳回
與指定鍵相關的特徵值。 若未找到該金鑰,則返回 null。
備註
特徵提供事件的額外資訊,並由事件聆聽者詮釋。 特徵在事件來源建構時以鍵值對形式指定。