Adds a WeeklyPattern, given the sets of days in the week, the weekly interval, and the pattern name.
[Visual Basic] Overloads Public Function AddWeeklyPattern( _ ByVal daysOfWeek As DaysOfWeek, _ ByVal everyNthWeek As Integer, _ ByVal patternName As String _ ) As WeeklyPattern [C#] public WeeklyPattern AddWeeklyPattern( DaysOfWeek daysOfWeek, int everyNthWeek, string patternName ); [C++] public: WeeklyPattern* AddWeeklyPattern( DaysOfWeek daysOfWeek, int everyNthWeek, String* patternName ); [JScript] public function AddWeeklyPattern( daysOfWeek : DaysOfWeek, everyNthWeek : int, patternName : String ) : WeeklyPattern;
The WeeklyPattern.
Exception Type | Condition |
---|---|
ArgumentException | The patternName parameter value is greater than 255 characters. |
ArgumentNullException | The patternName parameter value is a null reference (in Visual Basic Nothing). |
When a pattern is added, the next scheduled time is automatically recalculated.
The properties of the pattern that are not set through parameters are set to the pattern type's default values.
RecurrencePatterns Class | RecurrencePatterns Members | System.Timers Namespace | RecurrencePatterns.AddWeeklyPattern Overload List | DaysOfWeek | WeeklyPattern