# ProjectAssignmentCollection

Resource assignments owned by the project.

Class 

`OfficeIMO.Project`

**Namespace**

`OfficeIMO.Project`

**Assembly**

`OfficeIMO.Project`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Implements**

`IReadOnlyList<ProjectAssignment>` `IReadOnlyCollection<ProjectAssignment>` `IEnumerable<ProjectAssignment>` `IEnumerable`

**Modifiers**

sealed

**Attributes**

`DefaultMember("Item")`

Resource assignments owned by the project.

## Inheritance

- object
- ProjectAssignmentCollection

## 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.Assignments](/api/project/officeimo-project-projectdocument/#property-assignments)

Filter members 

Show inherited

## Methods

`public ProjectAssignment Add(ProjectTask task, ProjectResource resource, ProjectUnits? units = null)` [#](#method-add-officeimo-project-projecttask-officeimo-project-projectresource-nullable-officeimo-project-projectunits)

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

Adds an assignment between entities from this document.

Parameters

**task OfficeIMO.Project.ProjectTask required**

**resource OfficeIMO.Project.ProjectResource required**

**units OfficeIMO.Project.ProjectUnits? = null optional**

Returns

`ProjectAssignment`

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

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

Finds an assignment by stable UID.

Parameters

**uid int required**

Returns

`ProjectAssignment`

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

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

Returns an enumerator that iterates through the collection.

Returns

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

`public bool Remove(ProjectAssignment assignment)` [#](#method-remove-officeimo-project-projectassignment)

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

Removes an assignment while retaining its task and resource.

Parameters

**assignment OfficeIMO.Project.ProjectAssignment 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:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/Collections/ProjectRelationshipCollections.cs#L43)

Number of assignments.

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

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

Assignment by position.

Parameters

**index int required**

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