SortableList Methods |
The SortableList type exposes the following members.
Name | Description | |
---|---|---|
Add |
IList implementation.
If the KeepSorted property is set to true, the object will be added at the right place.
Else it will be added at the end of the list.
| |
AddRange |
If the KeepSorted property is set to true, the object will be added at the right place.
Else it will be appended to the list.
| |
Clear |
IList implementation.
Idem ArrayList | |
Clone |
ICloneable implementation.
Idem ArrayList | |
Contains |
IList implementation.
Search for a specified object in the list.
If the list is sorted, a BinarySearch is performed using IComparer interface.
Else the Object.Equals implementation is used.
| |
CopyTo |
IList.ICollection implementation.
Idem ArrayList | |
Equals |
Object.Equals() override.
(Overrides ObjectEquals(Object).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator |
IList.IEnumerable implementation.
Idem ArrayList | |
GetHashCode |
Object.GetHashCode() override.
(Overrides ObjectGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf(Object) |
IList implementation.
Returns the index of the specified object in the list.
If the list is sorted, a BinarySearch is performed using IComparer interface.
Else the Object.Equals implementation of objects is used.
| |
IndexOf(Object, SortableListEquality) |
Idem IndexOf(object), but with a specified equality function
| |
IndexOf(Object, Int32) |
Idem IndexOf(object), but starting at a specified position in the list
| |
IndexOf(Object, Int32, SortableListEquality) |
Idem IndexOf(object), but with a start index and a specified equality function
| |
IndexOfMax |
Returns the object of the list whose value is maximum
| |
IndexOfMin |
Returns the object of the list whose value is minimum
| |
Insert |
IList implementation.
Inserts an objects at a specified index.
Cannot be used if the list has its KeepSorted property set to true.
| |
InsertRange |
Inserts a collection of objects at a specified index.
Should not be used if the list is the KeepSorted property is set to true.
| |
LimitNbOccurrences |
Limits the number of occurrences of a specified value.
Same values are equals according to the Equals() method of objects in the list.
The first occurrences encountered are kept.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove |
IList implementation.
Idem ArrayList | |
RemoveAt |
IList implementation.
Idem ArrayList | |
RemoveDuplicates |
Removes all duplicates in the list.
Each value encountered will have only one representant.
| |
Sort |
Sorts the elements in the list using ArrayList.Sort.
Does nothing if the list is already sorted.
| |
ToString |
Object.ToString() override.
Build a string to represent the list.
(Overrides ObjectToString.) |