MaskType enumeration

Specifies the type of a mask.

public enum MaskType


Null0Indicates Null mask type.
Numbers1Indicates Numbers mask type.
UpperCaseLetters2Indicates UpperCaseLetters mask type.
LowerCaseLetters3Indicates LowerCaseLetters mask type.
Characters4Indicates Characters mask type.
Val45Indicates Lookup for Cost mask type.
Val56Indicates Lookup for Dates mask type.
Val67Indicates Lookup for Durations mask type.
Val78Indicates Lookup for Numbers mask type.
Val89Indicates Lookup for Flags mask type.
Val910Indicates Lookup for FinishDate mask type.


Shows how to work with outline mask collections.

var project = new Project(DataDir + "OutlineValues2010.mpp");

var outline = project.OutlineCodes[0];

// clear outline masks
if (outline.Masks.Count > 0)
    if (!outline.Masks.IsReadOnly)

var mask = new OutlineMask();
mask.Type = MaskType.Characters;
var maskWrong = new OutlineMask();
maskWrong.Type = MaskType.Null;


// insert a wrong mask 
outline.Masks.Insert(0, maskWrong);

// edit the mask by using index access of collection
var idx = outline.Masks.IndexOf(mask);
outline.Masks[idx].Length = 2;

// remove a wrong mask by index
var idxOfWrong = outline.Masks.IndexOf(maskWrong);

// iterate over masks
foreach (var outlineMask in outline.Masks)
    Console.WriteLine("Length: " + outlineMask.Length);
    Console.WriteLine("Level: " + outlineMask.Level);
    Console.WriteLine("Separator: " + outlineMask.Separator);
    Console.WriteLine("Type: " + outlineMask.Type);

var otherProject = new Project(DataDir + "OutlineValues2010.mpp");

var otherOutline = otherProject.OutlineCodes[0];

var masks = new OutlineMask[outline.Masks.Count];
outline.Masks.CopyTo(masks, 0);

foreach (var maskToAdd in masks)
    if (!otherOutline.Masks.Contains(maskToAdd))

See Also