語言

Activity.SetCustomProperty(String, Object) 方法

定義

將任何自訂物件附加到此活動中。 如果指定 propertyName 物件先前與其他物件相關聯,該屬性會更新為與新的 propertyValue 物件相關聯。 建議使用獨特的房產名稱,以避免與使用相同價值的人產生衝突。

public:
 void SetCustomProperty(System::String ^ propertyName, System::Object ^ propertyValue);
public void SetCustomProperty(string propertyName, object? propertyValue);
member this.SetCustomProperty : string * obj -> unit
Public Sub SetCustomProperty (propertyName As String, propertyValue As Object)

參數

propertyName
String

這個名字用來聯想這個價值。

propertyValue
Object

要附加並映射到屬性名稱的物件。

適用於