CalendarCollection.GetByUid
CalendarCollection.GetByUid method
Returns a calendar with the specified UID.
public Calendar GetByUid(int uid)
Parameter | Type | Description |
---|---|---|
uid | Int32 | UID of a calendar. |
Return Value
Calendar with a specified UID.
Examples
Shows how to get calendars by name or by id.
var project = new Project(DataDir + "Project5.mpp");
var calendarByName = project.Calendars.GetByName("TestCalendar");
var calendarByUid = project.Calendars.GetByUid(4);
Console.WriteLine("Calendar Name: " + calendarByName.Name);
Console.WriteLine("Calendar Name: " + calendarByUid.Name);
Console.WriteLine("Are calendars equals: " + calendarByName.Equals(calendarByUid));
See Also
- class Calendar
- class CalendarCollection
- namespace Aspose.Tasks
- assembly Aspose.Tasks