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.
The requested RecurrencePattern object.
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. |
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.
RecurrencePatterns Class | RecurrencePatterns Members | System.Timers Namespace | RecurrencePatterns.Item Overload List | Add | AddDailyPattern | AddDaysOfMonthPattern | AddMonthlyPattern | AddWeeklyPattern | IRecurrencePattern | RecurrencePattern