共用方式為


UserActivityChannel.DeleteActivityAsync(String) 方法

定義

刪除特定使用者活動。

public:
 virtual IAsyncAction ^ DeleteActivityAsync(Platform::String ^ activityId) = DeleteActivityAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction DeleteActivityAsync(winrt::hstring const& activityId);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction DeleteActivityAsync(string activityId);
function deleteActivityAsync(activityId)
Public Function DeleteActivityAsync (activityId As String) As IAsyncAction

參數

activityId
String

Platform::String

winrt::hstring

要刪除之使用者活動的識別碼。

傳回

非同步動作。

屬性

範例

UserActivityChannel channel = UserActivityChannel.GetDefault();
string activityId = "/article?" + article.Link;
channel.DeleteActivity(activityId);

備註

您可以從 UserActivity.ActivityId取得使用者活動的識別碼。

適用於