GetEnumerator

CalendarCollection.GetEnumerator method

Returns an enumerator for this collection.

public IEnumerator<Calendar> GetEnumerator()

Return Value

an enumerator for this collection.

Examples

Shows how to add new calendars.

var project = new Project();

// new calendars can be added to a project's calendar collection by using the collection's Add overloads.
project.Calendars.Add("Calendar");
var newCalendar = project.Calendars.Add("Parent");
project.Calendars.Add("Child", newCalendar);

foreach (var calendar in project.Calendars)
{
    Console.WriteLine("Calendar Name: " + calendar.Name);
}

See Also