// Create project instance System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName()); System::SharedPtr project1 = System::MakeObject(dataDir + u"ViewSplitTasks.mpp"); // Access task System::SharedPtr splitTask = project1->get_RootTask()->get_Children()->GetById(4); // Display split parts of task System::SharedPtr collection = splitTask->get_SplitParts(); { auto splitPart_enumerator = (collection)->GetEnumerator(); decltype(splitPart_enumerator->get_Current()) splitPart; while (splitPart_enumerator->MoveNext() && (splitPart = splitPart_enumerator->get_Current(), true)) { System::Console::WriteLine(System::String(u"Index: ") + splitPart->get_Index() + u"\nStart: " + splitPart->get_Start() + u"\nFinish: " + splitPart->get_Finish() + u"\n"); } }