Definition
Constructors
Initializes a new instance of the LinkedObjectCollection<T> class.
public LinkedObjectCollection(T parent)
The parent.
Properties
public bool IsReadOnly { get; }
Implements:
Gets or sets the T object that is the parent of the current node.
public T Parent { get; protected set; }
The parent.
Methods
Adds an item to the ICollection<T>.
public void Add(T item)
The object to add to the ICollection<T>.
Exceptions: NotSupportedExceptionThe ICollection<T> is read-only.
Implements:
Removes all items from the ICollection<T>.
Determines whether the ICollection<T> contains a specific value.
public bool Contains(T item)
The object to locate in the ICollection<T>.
Returns:true if item is found in the ICollection<T>; otherwise, false.
Implements:
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
public void CopyTo(T[] array, int arrayIndex)
The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.
array is null.
arrayIndex is less than 0.
array is multidimensional.
-or-
arrayIndex is equal to or greater than the length of array.
-or-
The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.
-or-
Type cannot be cast automatically to the type of the destination array.
Implements:
Returns an enumerator that iterates through the collection.
public IEnumerator<T> GetEnumerator()
IEnumerator<T>
A IEnumerator<T> that can be used to iterate through the collection.
Implements:
Inserts an item to the IList<T> at the specified index.
public void Insert(int index, T item)
The zero-based index at which item should be inserted.
The object to insert into the IList<T>.
Exceptions: ArgumentOutOfRangeExceptionindex is not a valid index in the IList<T>.
The IList<T> is read-only.
Implements:
Removes the first occurrence of a specific object from the ICollection<T>.
public bool Remove(T item)
The object to remove from the ICollection<T>.
Returns:true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.
The ICollection<T> is read-only.
Implements:
Removes the IList<T> item at the specified index.
public void RemoveAt(int index)
The zero-based index of the item to remove.
Exceptions: ArgumentOutOfRangeExceptionindex is not a valid index in the IList<T>.
The IList<T> is read-only.
Implements: