# ProjectDependencyCollection

Task links owned by a project. Review signatures, members, parameters, type relationships, and available reference details in OfficeIMO.Project API Reference.

Class 

`OfficeIMO.Project`

**Namespace**

`OfficeIMO.Project`

**Assembly**

`OfficeIMO.Project`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Implements**

`IReadOnlyList<ProjectDependency>` `IReadOnlyCollection<ProjectDependency>` `IEnumerable<ProjectDependency>` `IEnumerable`

**Modifiers**

sealed

**Attributes**

`DefaultMember("Item")`

Task links owned by a project.

## Inheritance

- object
- ProjectDependencyCollection

## Usage

Explore 1 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 1

- Property [ProjectDocument.Dependencies](/api/project/officeimo-project-projectdocument/#property-dependencies)

Filter members 

Show inherited

## Methods

`public ProjectDependency Add(ProjectTask predecessor, ProjectTask successor, ProjectDependencyType type = FinishToStart)` [#](#method-add-officeimo-project-projecttask-officeimo-project-projecttask-officeimo-project-projectdependencytype)

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

Adds a local task dependency after checking identities and duplicate links.

Parameters

**predecessor OfficeIMO.Project.ProjectTask required**

**successor OfficeIMO.Project.ProjectTask required**

**type OfficeIMO.Project.ProjectDependencyType = FinishToStart optional**

Returns

`ProjectDependency`

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

[ProjectRelationshipCollections.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectRelationshipCollections.cs#L33)

Returns an enumerator that iterates through the collection.

Returns

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

`public bool Remove(ProjectDependency dependency)` [#](#method-remove-officeimo-project-projectdependency)

[ProjectRelationshipCollections.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectRelationshipCollections.cs#L26)

Removes a relationship without removing either task.

Parameters

**dependency OfficeIMO.Project.ProjectDependency required**

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)

[ProjectRelationshipCollections.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectRelationshipCollections.cs#L9)

Number of relationships.

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

[ProjectRelationshipCollections.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectRelationshipCollections.cs#L11)

Relationship by position.

Parameters

**index int required**

<!-- PowerForge markdown artifact sha256:0556448F53A5FFF34DD301AFBE38DF5B453C461F00FC5286BFB54D33462F425A -->
