Aspose.Email.Examples.CSharp.Email.Outlook.MonthlyEndAfterNoccurrences.GetOccurrenceCount C# (CSharp) Метод

GetOccurrenceCount() приватный статический Метод

private static GetOccurrenceCount ( System.DateTime start, System.DateTime endBy, string rrule ) : uint
start System.DateTime
endBy System.DateTime
rrule string
Результат uint
        private static uint GetOccurrenceCount(DateTime start, DateTime endBy, string rrule)
        {
            // ExStart:GetOccurrenceCountMonthlyEndAfterNoccurrences     
            CalendarRecurrence pattern = new CalendarRecurrence(string.Format("DTSTART:{0}\r\nRRULE:{1}", start.ToString("yyyyMMdd"), rrule));
            DateCollection dates = pattern.GenerateOccurrences(start, endBy);       
            return (uint)dates.Count;
            // ExEnd:GetOccurrenceCountMonthlyEndAfterNoccurrences
        }
    }
MonthlyEndAfterNoccurrences