Share via


TaskListCollection Class

Definition

Provides a container class for task list elements.

public ref class TaskListCollection sealed : System::Collections::CollectionBase
public sealed class TaskListCollection : System.Collections.CollectionBase
type TaskListCollection = class
    inherit CollectionBase
Public NotInheritable Class TaskListCollection
Inherits CollectionBase
Inheritance
TaskListCollection

Examples

The following example implements the Tasks property.

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

        if (_dhTaskList == null)
        {
            _dhTaskList = new HierarchyDemoInfoTaskList(this);
        }
        tlc.Insert(0, _dhTaskList);

        return tlc;
    }
}

Remarks

A class implementation may have a TaskListCollection member, but more typically a TaskListCollection is created in the get accessor of a property or the return value of a method.

Constructors

TaskListCollection()

Initializes a new instance of the TaskListCollection class.

TaskListCollection(ICollection)

Initializes a new instance of the TaskListCollection class with the specified task list element.

Properties

Item[Int32]

Gets or sets array access semantics for the task list collection.

Methods

Add(TaskList)

Adds a task list to the collection.

Contains(TaskList)

Returns a value that indicates whether the object is in the task list collection.

CopyTo(TaskList[], Int32)

Copies the entire task list collection to a compatible one-dimensional task list array, starting at the specified index of the target array.

IndexOf(TaskList)

Searches for the specified task list and returns the zero-based index of the first occurrence in the collection.

Insert(Int32, TaskList)

Inserts an element into the TaskListCollection object at the specified index.

Remove(TaskList)

Removes the first occurrence of a specific object from the task list collection.

Applies to