Extendedattribute

I want to know how can i get the cost1 value of any task with extendedattribute

Hi Omer,

Here is the sample code.

ProjectReader reader = new ProjectReader();
Project project = reader.Read("Project1.mpp");
ChildTasksCollector collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);
foreach (Task task in collector.Tasks)
{
    foreach (ExtendedAttribute extendedAttribute in task.ExtendedAttribute)
    {
        switch (extendedAttribute.AttributeDefinition.FieldName)
        {
            case "Cost1":
                //Some actions
                break;
            case "Date1":
                //Some actions
                break;
            default:
                //Some actions
                break;
        }
    }
}

Please feel free to contact us in case you have further comments or questions.

Best Regards,