Gets or sets the recurrence pattern specified by the given pattern name.
[C#] In C#, this member is the indexer for the RecurrencePatterns class.
[Visual Basic] Overloads Public Default Property Item( _ ByVal patternName As String _ ) As IRecurrencePattern [C#] public IRecurrencePattern this[ string patternName ] {get; set;} [C++] public: __property IRecurrencePattern* get_Item( String* patternName ); public: __property void set_Item( String* patternName, IRecurrencePattern* ); [JScript] returnValue = RecurrencePatternsObject.Item(patternName); RecurrencePatternsObject.Item(patternName) = returnValue; -or- returnValue = RecurrencePatternsObject(patternName); RecurrencePatternsObject(patternName) = 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 pattern's name or value is a null reference (in Visual Basic Nothing). |
System.InvalidOperation | The name of the new recurrence pattern you are trying to add already exists in the collection. |
When a pattern is added, the next scheduled time is automatically recalculated.
Setting a recurrence pattern by specifying the patternName only overrides the pattern with the specified name. 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