Class RunCollection
Provides ordered access to the runs in a paragraph.
Inherited Members
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public class RunCollection : IEnumerable<Run>, IEnumerable
Properties
Count
Gets the number of runs in the collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets the run at the specified zero-based index.
Declaration
public Run this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based run index. |
Property Value
| Type | Description |
|---|---|
| Run | The run at |
Methods
Add(Run)
Adds a run to the end of the paragraph.
Declaration
public void Add(Run item)
Parameters
| Type | Name | Description |
|---|---|---|
| Run | item | The run to add. |
GetEnumerator()
Returns an enumerator over runs in paragraph order.
Declaration
public IEnumerator<Run> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<Run> | An enumerator over the live collection. |
Insert(int, Run)
Inserts a run at the specified zero-based index.
Declaration
public void Insert(int index, Run item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based insertion index. |
| Run | item | The run to insert. |
Remove(Run)
Removes the first matching run from the paragraph.
Declaration
public bool Remove(Run item)
Parameters
| Type | Name | Description |
|---|---|---|
| Run | item | The run to remove. |
Returns
| Type | Description |
|---|---|
| bool |
RemoveAt(int)
Removes the run at the specified zero-based index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index to remove. |