NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RecurrencePatterns.Add

Adds a new recurrence pattern to the collection.

[Visual Basic]
Public Sub Add( _
   ByVal recurrencePattern As IRecurrencePattern _
)
[C#]
public void Add(
   IRecurrencePattern recurrencePattern
);
[C++]
public: void Add(
   IRecurrencePattern* recurrencePattern
);
[JScript]
public function Add(
   recurrencePattern : IRecurrencePattern
);

Parameters

recurrencePattern
The recurrence pattern to be added.

Exceptions

Exception Type Condition
ArgumentNullException The recurrencePattern is a null reference (in Visual Basic Nothing).
InvalidOperationException The recurrencePattern parameter value is the same as one of the recurrence pattern names already in the collection.

Remarks

When a pattern is added, the next scheduled time is automatically recalculated.

Use Add if you have a recurrence pattern that is previously defined. If you define a recurrence pattern before adding it to the collection, you can add it to multiple RecurrencePatterns collections without making a copy of the recurrence pattern.

If you create your own recurrence patterns, use Add to add them to the collection.

See Also

RecurrencePatterns Class | RecurrencePatterns Members | System.Timers Namespace | Count | IRecurrencePattern