Interface INotifyCollection<T>
- Namespace
- Acuit.Pinpoint.Common.Collections
- Assembly
- Acuit.Pinpoint.Common.dll
A collection that notifies listeners of dynamic changes, such as when an item is added and removed or the whole list is cleared.
public interface INotifyCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged
Type Parameters
TThe type of the elements in the collection.
- Inherited Members
- Extension Methods
Properties
this[int]
Gets or sets the element at the specified index.
T this[int index] { get; set; }
Parameters
indexintThe zero-based index of the element to get or set.
Property Value
- T
The element at the specified index.
Exceptions
- ArgumentOutOfRangeException
indexis less than zero.- ArgumentOutOfRangeException
indexis equal to or greater than Count.
Methods
IndexOf(T)
Searches for the specified object and returns the zero-based index of the first occurrence within the entire collection.
int IndexOf(T item)
Parameters
itemTThe object to locate in the collection.
Returns
- int
The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.
Insert(int, T)
Inserts an element into the collection at the specified index.
void Insert(int index, T item)
Parameters
indexintThe zero-based index at which
itemshould be inserted.itemTThe object to insert.
Exceptions
- ArgumentOutOfRangeException
indexis less than zero.- ArgumentOutOfRangeException
indexis greater than Count.
Move(int, int)
Moves the item at the specified index to a new location in the collection.
void Move(int oldIndex, int newIndex)
Parameters
oldIndexintThe zero-based index specifying the location of the item to be moved.
newIndexintThe zero-based index specifying the new location of the item.
RemoveAt(int)
Removes the element at the specified index of the collection.
void RemoveAt(int index)
Parameters
indexintThe zero-based index of the element to remove.
Exceptions
- ArgumentOutOfRangeException
indexis less than zero.- ArgumentOutOfRangeException
indexis equal to or greater than Count.