Set

Set<T>(Key<T, PrjKey>, T)

Maps the specified property to the specified value in this container.

public void Set<T>(Key<T, PrjKey> key, T val)
ParameterDescription
Tthe type of the mapped value.
keythe specified property key. Prj for getting the property key.
valthe value.

Examples

Shows how to set task’s attributes.

var project = new Project();
project.Set(Prj.NewTaskStartDate, TaskStartDateType.CurrentDate);
project.Save(OutDir + "SetAttributesForNewTasks_out.xml", SaveFileFormat.Xml);

See Also


Set(Key<DateTime, PrjKey>, DateTime)

Maps the specified property to the specified value in this container.

public void Set(Key<DateTime, PrjKey> key, DateTime val)
ParameterTypeDescription
keyKey`2the specified property key. Prj for getting the property key.
valDateTimethe value.

Examples

Shows how to set task’s attributes.

var project = new Project();
project.Set(Prj.NewTaskStartDate, TaskStartDateType.CurrentDate);
project.Save(OutDir + "SetAttributesForNewTasks_out.xml", SaveFileFormat.Xml);

See Also