Skip to content

Methods_T_CodeJam_Collections_ArrayExtensions

Andrew Koryavchenko edited this page Jul 4, 2017 · 7 revisions

ArrayExtensions Methods

The ArrayExtensions type exposes the following members.

Methods

 

Name Description
Public methodStatic member Any(T) Checks if any element in array exists.
Public methodStatic member AsReadOnly(T) Returns a read-only wrapper for the specified array.
Public methodStatic member BinarySearch(T)(T[], T) Searches an entire one-dimensional sorted Array for a specific element, using the IComparable(T) generic interface implemented by each element of the Array and by the specified object.
Public methodStatic member BinarySearch(T)(T[], T, IComparer(T)) Searches an entire one-dimensional sorted Array for a value using the specified IComparer(T) generic interface.
Public methodStatic member BinarySearch(T)(T[], Int32, Int32, T) Searches a range of elements in a one-dimensional sorted Array for a value, using the IComparable(T) generic interface implemented by each element of the Array and by the specified value.
Public methodStatic member BinarySearch(T)(T[], Int32, Int32, T, IComparer(T)) Searches a range of elements in a one-dimensional sorted Array for a value, using the specified IComparer(T) generic interface.
Public methodStatic member Clear(Array) Sets all elements in an Array to the default value of each element type.
Public methodStatic member Clear(Array, Int32, Int32) Sets a range of elements in the Array to zero, to false, or to null, depending on the element type.
Public methodStatic member ConstrainedCopy Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.
Public methodStatic member ConvertAll(TInput, TOutput) Converts an array of one type to an array of another type.
Public methodStatic member Copy(Array, Array, Int32) Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 32-bit integer.
Public methodStatic member Copy(Array, Array, Int64) Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 64-bit integer.
Public methodStatic member Copy(Array, Int32, Array, Int32, Int32) Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. The length and the indexes are specified as 64-bit integers.
Public methodStatic member Copy(Array, Int64, Array, Int64, Int64) Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. The length and the indexes are specified as 32-bit integers.
Public methodStatic member EqualsTo(Byte[], Byte[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(Guid[], Guid[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(Int16[], Int16[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(Int32[], Int32[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(Int64[], Int64[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(SByte[], SByte[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(String[], String[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(TimeSpan[], TimeSpan[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(UInt16[], UInt16[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(UInt32[], UInt32[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(UInt64[], UInt64[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(String[], String[], StringComparison) Returns true, if length and content of a equals b. A parameter specifies the culture, case, and sort rules used in the comparison.
Public methodStatic member EqualsTo(T)(Nullable(T)[], Nullable(T)[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(T)(T[], T[]) Returns true, if length and content of a equals b.
Public methodStatic member EqualsTo(T)(T[], T[], IEqualityComparer(T)) Returns true, if length and content of a equals b.
Public methodStatic member Exists(T) Determines whether the specified array contains elements that match the conditions defined by the specified predicate.
Public methodStatic member Find(T) Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Array.
Public methodStatic member FindAll(T) Retrieves all the elements that match the conditions defined by the specified predicate.
Public methodStatic member FindIndex(T)(T[], Predicate(T)) 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 Array.
Public methodStatic member FindIndex(T)(T[], Int32, Predicate(T)) 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 Array that extends from the specified index to the last element.
Public methodStatic member FindIndex(T)(T[], Int32, Int32, Predicate(T)) 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 Array that starts at the specified index and contains the specified number of elements.
Public methodStatic member FindLast(T) Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire Array.
Public methodStatic member FindLastIndex(T)(T[], Predicate(T)) 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 Array.
Public methodStatic member FindLastIndex(T)(T[], Int32, Predicate(T)) 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 Array that extends from the first element to the specified index.
Public methodStatic member FindLastIndex(T)(T[], Int32, Int32, Predicate(T)) 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 Array that contains the specified number of elements and ends at the specified index.
Public methodStatic member ForEach(T) Performs the specified action on each element of the specified array.
Public methodStatic member IndexOf(T)(T[], T) Searches for the specified object and returns the index of the first occurrence within the entire Array.
Public methodStatic member IndexOf(T)(T[], T, Int32) Searches for the specified object and returns the index of the first occurrence within the range of elements in the Array that extends from the specified index to the last element.
Public methodStatic member IndexOf(T)(T[], T, Int32, Int32) Searches for the specified object and returns the index of the first occurrence within the range of elements in the Array that starts at the specified index and contains the specified number of elements.
Public methodStatic member LastIndexOf(T)(T[], T) Searches for the specified object and returns the index of the last occurrence within the entire Array.
Public methodStatic member LastIndexOf(T)(T[], T, Int32) Searches for the specified object and returns the index of the last occurrence within the range of elements in the Array that extends from the first element to the specified index.
Public methodStatic member LastIndexOf(T)(T[], T, Int32, Int32) Searches for the specified object and returns the index of the last occurrence within the range of elements in the Array that contains the specified number of elements and ends at the specified index.
Public methodStatic member Reverse(Array) Reverses the sequence of the elements in the entire one-dimensional Array.
Public methodStatic member Reverse(Array, Int32, Int32) Reverses the sequence of the elements in a range of elements in the one-dimensional Array.
Public methodStatic member Sort(T)(T[]) Sorts the elements in an entire Array using the IComparable(T) generic interface implementation of each element of the Array.
Public methodStatic member Sort(T)(T[], IComparer(T)) Sorts the elements in an Array using the specified IComparer(T) generic interface.
Public methodStatic member Sort(T)(T[], Comparison(T)) Sorts the elements in an Array using the specified Comparison(T).
Public methodStatic member Sort(T)(T[], Int32, Int32) Sorts the elements in a range of elements in an Array using the IComparable(T) generic interface implementation of each element of the Array.
Public methodStatic member Sort(T)(T[], Int32, Int32, IComparer(T)) Sorts the elements in a range of elements in an Array using the specified IComparer(T) generic interface.
Public methodStatic member TrueForAll(T) Determines whether every element in the array matches the conditions defined by the specified predicate.
  Back to Top

See Also

Reference

ArrayExtensions Class
CodeJam.Collections Namespace

Clone this wiki locally