Count

CalendarCollection.Count property

Gets the number of objects contained in this CalendarCollection object.

public int Count { get; }

Examples

Shows how to iterate over calendar collection.

var project = new Project(DataDir + "Project5.mpp");

Console.WriteLine("Number of calendars in the project: " + project.Calendars.Count);
List<Calendar> calendars = project.Calendars.ToList();
foreach (var calendar in calendars)
{
    Console.WriteLine("Calendar Name: " + calendar.Name);
}

See Also