Class BlockCollection
Represents a collection for blocks.
public class BlockCollection : IEnumerable<Block>, IEnumerable, INotifyCollectionChanged
- Inheritance
-
BlockCollection
- Implements
- Inherited Members
Methods
Add(Block)
Adds a block.
public void Add(Block block)
Parameters
block
BlockBlock to add.
Exceptions
- ArgumentNullException
Thrown when
block
is null.
AddAt(Block, int)
Adds a block at a specific index.
public void AddAt(Block block, int index)
Parameters
Exceptions
- ArgumentNullException
Thrown when
block
is null.- ArgumentOutOfRangeException
Thrown when
index
is out of range.- InvalidOperationException
Thrown when the collection already has a block at the selected
index
.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<Block> GetEnumerator()
Returns
- IEnumerator<Block>
An enumerator that can be used to iterate through the collection.
Events
CollectionChanged
Occurs when the collection changes.
public event NotifyCollectionChangedEventHandler CollectionChanged