Initializes a new instance of the DaysOfMonthPattern class with a set of days in a month, a set of months in a year, the patternName, the time of day to start and stop the event recurrence pattern, the pattern repetition rate, and the dates when the event recurrence pattern starts and stops being valid specified.
[Visual Basic] Overloads Public Sub New( _ ByVal daysOfMonth() As Integer, _ ByVal monthsOfYear As Months, _ ByVal patternName As String, _ ByVal startTime As TimeSpan, _ ByVal endTime As TimeSpan, _ ByVal interval As TimeSpan, _ ByVal validFrom As DateTime, _ ByVal validUntil As DateTime _ ) [C#] public DaysOfMonthPattern( int[] daysOfMonth, Months monthsOfYear, string patternName, TimeSpan startTime, TimeSpan endTime, TimeSpan interval, DateTime validFrom, DateTime validUntil ); [C++] public: DaysOfMonthPattern( int* daysOfMonth[], Months monthsOfYear, String* patternName, TimeSpan startTime, TimeSpan endTime, TimeSpan interval, DateTime validFrom, DateTime validUntil ); [JScript] public function DaysOfMonthPattern( daysOfMonth : int[], monthsOfYear : Months, patternName : String, startTime : TimeSpan, endTime : TimeSpan, interval : TimeSpan, validFrom : DateTime, validUntil : DateTime );
Exception Type | Condition |
---|---|
ArgumentException | The endTime parameter value is less than 0 or greater than 23:59:59.
-or- The interval parameter value is less than 0. -or- The patternName parameter value is greater than 255 characters. -or- The startTime parameter value is less than 0 or greater than 23:59:59. -or- The daysOfMonth parameter value is a null reference (in Visual Basic Nothing). -or- The daysOfMonth parameter's index is less than 0 or greater than 31. -or- The monthsOfYear parameter value is not a valid Months value. |
ArgumentNullException | The patternName parameter value is a null reference (Nothing). |
If the ValidFrom property is greater than the ValidUntil property, the values are switched.
DaysOfMonthPattern Class | DaysOfMonthPattern Members | System.Timers Namespace | DaysOfMonthPattern Constructor Overload List | DateTime | Months | TimeSpan