Class TaskCollection

TaskCollection class

A collection of Task objects that can be manipulated as a single unit.

public class TaskCollection : Collection<Task>

Constructors

NameDescription
TaskCollection()The default constructor.

Remarks

This collection class provides a strongly-typed list of tasks that can be used to manage multiple task objects together. It supports standard collection operations such as adding, removing, and iterating through tasks.

Use this collection when working with multiple tasks or when binding task data to UI controls.

Examples

[C#]

var collection = new TaskCollection();

// Add tasks to the collection
var task1 = new Task();
task1.Subject = "Task 1";
collection.Add(task1);

var task2 = new Task();
task2.Subject = "Task 2";
collection.Add(task2);

// Iterate through tasks
foreach (var task in collection)
{
    Console.WriteLine(task.Subject);
}

See Also