TaskListCollection.Add(TaskList) Method

Definition

Adds a task list to the collection.

public:
 int Add(Microsoft::Web::Management::Client::TaskList ^ taskList);
public int Add (Microsoft.Web.Management.Client.TaskList taskList);
member this.Add : Microsoft.Web.Management.Client.TaskList -> int

Parameters

taskList
TaskList

The TaskList object to add.

Returns

The position into which the new element was inserted.

Examples

The following example adds a task list to the task list collection.

public override TaskListCollection Tasks {
    get {
        TaskListCollection tlc = base.Tasks;

        if (_dhTaskList == null) {
            _dhTaskList = new HierarchyDemoInfoTaskList(this);
        }
        tlc.Add(_dhTaskList);

        return tlc;
    }
} 

Applies to