ScheduledActionService.Replace Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Replaces an existing ScheduledAction with the one provided. The Name property uniquely identifies ScheduledAction objects and is used to determine which existing object, if any, is replaced.

Namespace:  Microsoft.Phone.Scheduler
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Shared Sub Replace ( _
    action As ScheduledAction _
)
public static void Replace(
    ScheduledAction action
)

Parameters

Remarks

This method is only for use with ScheduledNotification. Attempting to replace a ScheduledTask with this method will throw an exception.

This method may throw one of the following exceptions.

InvalidOperationException

No ScheduledAction with the same name as the provided object is registered with the service.

NotSupportedException

The Replace method is only for use with ScheduledNotification objects. ScheduledTask objects are not supported.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

ScheduledActionService Class

Microsoft.Phone.Scheduler Namespace