Class ContentElementCollection
Collection of content elements.
Inheritance
System.Object
ContentElementCollection
Namespace: IronWord.Models.Abstract
Assembly: IronWord.dll
Syntax
public class ContentElementCollection : Object, IEnumerable<ContentElement>, IEnumerable
Constructors
ContentElementCollection()
Create an empty content element collection.
Declaration
public ContentElementCollection()
ContentElementCollection(IList<ContentElement>)
Add contents of a list to this collection.
Declaration
public ContentElementCollection(IList<ContentElement> collection_in)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IList<ContentElement> | collection_in |
Properties
Count
Number of objects in the collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Item[Int32]
Indexer to access content by index.
Declaration
public ContentElement this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Property Value
| Type | Description |
|---|---|
| ContentElement |
Methods
First()
Get the first element of the collection.
Declaration
public ContentElement First()
Returns
| Type | Description |
|---|---|
| ContentElement |
GetEnumerator()
Get Enumerator for collection.
Declaration
public IEnumerator<ContentElement> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<ContentElement> |
IndexOf(ContentElement)
Get index of specified object in collection.
Declaration
public int IndexOf(ContentElement item)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentElement | item |
Returns
| Type | Description |
|---|---|
| System.Int32 |
Last()
Get the last element of the collection.
Declaration
public ContentElement Last()
Returns
| Type | Description |
|---|---|
| ContentElement |
Implements
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable