# ProjectTaskCollection

Immediate tasks in an outline, with lookup by stable UID across the document.

Class 

`OfficeIMO.Project`

**Namespace**

`OfficeIMO.Project`

**Assembly**

`OfficeIMO.Project`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[ProjectEntityCollections.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L14)

**Implements**

`IReadOnlyList<ProjectTask>` `IReadOnlyCollection<ProjectTask>` `IEnumerable<ProjectTask>` `IEnumerable`

**Modifiers**

sealed

**Attributes**

`DefaultMember("Item")`

Immediate tasks in an outline, with lookup by stable UID across the document.

## Inheritance

- object
- ProjectTaskCollection

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Property [ProjectDocument.Tasks](/api/project/officeimo-project-projectdocument/#property-tasks)
- Property [ProjectTask.Children](/api/project/officeimo-project-projecttask/#property-children)

Filter members 

Show inherited

## Methods

`public ProjectTask Add(string name)` [#](#method-add-string)

[ProjectEntityCollections.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L14)

Appends a task with a new stable UID.

Parameters

**name string required**

Returns

`ProjectTask`

`public ProjectTask AddSummary(string name)` [#](#method-addsummary-string)

[ProjectEntityCollections.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L16)

Appends a summary, which can contain child tasks.

Parameters

**name string required**

Returns

`ProjectTask`

`public ProjectTask GetByUid(int uid)` [#](#method-getbyuid-int32)

[ProjectEntityCollections.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L18)

Finds a task by UID in the whole document, not by row number.

Parameters

**uid int required**

Returns

`ProjectTask`

`public IEnumerator<ProjectTask> GetEnumerator()` [#](#method-getenumerator)

[ProjectEntityCollections.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L25)

Returns an enumerator that iterates through the collection.

Returns

`IEnumerator<ProjectTask>` An enumerator that can be used to iterate through the collection.

`public bool Remove(ProjectTask task, ProjectRemovalMode mode = RejectIfReferenced)` [#](#method-remove-officeimo-project-projecttask-officeimo-project-projectremovalmode)

[ProjectEntityCollections.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L21)

Removes an immediate task with an explicit relationship policy.

Parameters

**task OfficeIMO.Project.ProjectTask required**

**mode OfficeIMO.Project.ProjectRemovalMode = RejectIfReferenced optional**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int Count { get; }` [#](#property-count)

[ProjectEntityCollections.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L10)

Number of immediate tasks.

`public ProjectTask this[int index] { get; }` [#](#property-item-int32)

[ProjectEntityCollections.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectEntityCollections.cs#L12)

Immediate task by zero-based position.

Parameters

**index int required**

<!-- PowerForge markdown artifact sha256:C479ACA6529A6872F2DA7EE611F11DECF327402D60D36BAAFF2DA563C0BC18E6 -->
