Initializes a new instance of the SynchronizedList class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied and uses the specified syncLock object to synchronize its internal operations.
The collection whose elements should be added to the end of the List. The collection itself cannot be null, but it can contain elements that are null, for reference types.
The object to locate. The value can be null for reference types.
Returns:Int32. The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count.
The IComparer implementation to use when comparing elements; or null to use the default comparer Default.
Returns:Int32. The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count.
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire List.
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that extends from the specified index to the last element.
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that starts at the specified index and contains the specified number of elements.
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire List.
Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the List that extends from the specified index to the last element.
The collection whose elements should be inserted into the List. The collection itself cannot be null, but it can contain elements that are null, for reference types.
The IComparer implementation to use when comparing elements, or null to use the default comparer Default.
Throws:
​InvalidOperationExceptioncomparer is null, and the default comparer Default cannot find implementation of the IComparable generic interface or the IComparable interface for the type of the collection elements.* ArgumentException The implementation of comparer caused an error during the sort. For example, comparer might not return 0 when comparing an item with itself.
​
Sort(comparison)
Sorts the elements in the entire List using the specified Comparison.
​ArgumentNullExceptioncomparison is null.* ArgumentException The implementation of comparison caused an error during the sort. For example, comparison might not return 0 when comparing an item with itself.
​
Sort(comparer, swapCallback)
Sorts the elements in the entire List using the specified comparer and a related IList to sort in sync with this collection.
An optional callback method, invoked on every swap. If the callback returns true to indicate that it handled the swap, the default swap is not performed.
Throws:
​InvalidOperationExceptioncomparer is null, and the default comparer Default cannot find implementation of the IComparable generic interface or the IComparable interface for the type of the collection elements.* ArgumentException The implementation of comparer caused an error during the sort. For example, comparer might not return 0 when comparing an item with itself.
​
Sum(selector)
Computes the sum of the sequence of System.Int32 values that are obtained by invoking a transform function on each element of the list.