Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

ListBase<(Of <(<'T>)>)> Methods

The ListBase<(Of <(<'T>)>)> type exposes the following members.

Methods


  Name Description
Public method Add
Adds an item to the end of the list. This method is equivalent to calling:
C#
Insert(Count, item)
Public method AsReadOnly
Provides a read-only view of this list. The returned IList<T> provides a view of the list that prevents modifications to the list. Use the method to provide access to the list without allowing changes. Since the returned object is just a view, changes to the list will be reflected in the view.
Public method Clear
This method must be overridden by the derived class to empty the list of all items.
Public method Contains
Determines if the list contains any item that compares equal to item. The implementation simply checks whether IndexOf(item) returns a non-negative value.
Public method CopyTo(array<T>[]()[][])
Copies all the items in the list, in order, to array, starting at index 0.
Public method CopyTo(array<T>[]()[][], Int32)
Copies all the items in the list, in order, to array, starting at arrayIndex.
Public method CopyTo(Int32, array<T>[]()[][], Int32, Int32)
Copies a range of elements from the list to array, starting at arrayIndex.
Public method Find
Finds the first item in the list that satisfies the condition defined by predicate. If no item matches the condition, than the default value for T (null or all-zero) is returned.
Public method FindIndex(Predicate<(Of <<'(T>)>>))
Finds the index of the first item in the list that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public method FindIndex(Int32, Predicate<(Of <<'(T>)>>))
Finds the index of the first item, in the range of items extending from index to the end, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public method FindIndex(Int32, Int32, Predicate<(Of <<'(T>)>>))
Finds the index of the first item, in the range of count items starting from index, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public method FindLast
Finds the last item in the list that satisfies the condition defined by predicate. If no item matches the condition, than the default value for T (null or all-zero) is returned.
Public method FindLastIndex(Predicate<(Of <<'(T>)>>))
Finds the index of the last item in the list that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public method FindLastIndex(Int32, Predicate<(Of <<'(T>)>>))
Finds the index of the last item, in the range of items extending from the beginning of the list to index, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public method FindLastIndex(Int32, Int32, Predicate<(Of <<'(T>)>>))
Finds the index of the last item, in the range of count items ending at index, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public method GetEnumerator
Enumerates all of the items in the list, in order. The item at index 0 is enumerated first, then the item at index 1, and so on.
Public method IndexOf(T)
Finds the index of the first item in the list that is equal to item.
Public method IndexOf(T, Int32)
Finds the index of the first item, in the range of items extending from index to the end, that is equal to item.
Public method IndexOf(T, Int32, Int32)
Finds the index of the first item, in the range of count items starting from index, that is equal to item.
Public method Insert
This method must be overridden by the derived class to insert a new item at the given index.
Public method LastIndexOf(T)
Finds the index of the last item in the list that is equal to item.
Public method LastIndexOf(T, Int32)
Finds the index of the last item, in the range of items extending from the beginning of the list to index, that is equal to item.
Public method LastIndexOf(T, Int32, Int32)
Finds the index of the last item, in the range of count items ending at index, that is equal to item.
Public method Range
Returns a view onto a sub-range of this list. Items are not copied; the returned IList<T> is simply a different view onto the same underlying items. Changes to this list are reflected in the view, and vice versa. Insertions and deletions in the view change the size of the view, but insertions and deletions in the underlying list do not.
Public method Remove
Searches the list for the first item that compares equal to item. If one is found, it is removed. Otherwise, the list is unchanged.
Public method RemoveAt
This method must be overridden by the derived class to remove the item at the given index.
Public method TryFind
Finds the first item in the list that satisfies the condition defined by predicate.
Public method TryFindLast
Finds the last item in the list that satisfies the condition defined by predicate.