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.Item (Int32)

Gets or sets the recurrence pattern specified by the given index.

[C#] In C#, this member is the indexer for the RecurrencePatterns class.

[Visual Basic]
Overloads Public Default Property Item( _
   ByVal index As Integer _
) As IRecurrencePattern
[C#]
public IRecurrencePattern this[
   int index
] {get; set;}
[C++]
public: __property IRecurrencePattern* get_Item(
   int index
);
public: __property void set_Item(
   int index,
   IRecurrencePattern*
);
[JScript]
returnValue = RecurrencePatternsObject.Item(index);
RecurrencePatternsObject.Item(index) = returnValue;
-or-
returnValue = RecurrencePatternsObject(index);
RecurrencePatternsObject(index) = returnValue;

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed Item property whose type is Object and whose index type is String.

Arguments [JScript]

index
The zero-based index that identifies a recurrence pattern in the collection.

Parameters [Visual Basic, C#, C++]

index
The zero-based index that identifies a recurrence pattern in the collection.

Property Value

The requested RecurrencePattern object.

Exceptions

Exception Type Condition
ArgumentNullException The value is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException The index is less than 0 or greater than or equal to the number of recurrence patterns in the array.
InvalidOperationException The name of the pattern, that is overriding an existing pattern, already exists in the collection.

Remarks

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

Setting a recurrence pattern by specifying the index only overrides the pattern previously held at the specified index. Use Add, AddDailyPattern, AddDaysOfMonthPattern, AddMonthlyPattern, or AddWeeklyPattern to add a new pattern to the collection.

See Also

RecurrencePatterns Class | RecurrencePatterns Members | System.Timers Namespace | RecurrencePatterns.Item Overload List | Add | AddDailyPattern | AddDaysOfMonthPattern | AddMonthlyPattern | AddWeeklyPattern | IRecurrencePattern | RecurrencePattern