public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);
// ExStart:SetResourceCalendar
// Create project instance and add resource
Project project = new Project();
Resource res = project.Resources.Add("Resource1");
// Add standard calendar and assign to resource
Aspose.Tasks.Calendar cal = project.Calendars.Add("Resource1");
res.Set(Rsc.Calendar, cal);
// ExEnd:SetResourceCalendar
// Save project as XML
project.Save(dataDir + "SetResourceCalendar_out.xml", SaveFileFormat.XML);
}
}