Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: bool SubarrayEquals<T>(this T[], int, T[], IEqualityComparer<T>)

Declaration

public static bool SubarrayEquals<T>(
    this T[] sourceArray,
    int sourceStartIndex,
    T[] otherArray,
    IEqualityComparer<T> comparer = null
)

Summary

Determines whether a subarray within the current array is equal to the specified other array.

Generic type parameters

TThis type parameter is not documented.

Parameters

this T[]sourceArray First array to examine.
intsourceStartIndex Start index of the subarray within the first array to compare.
T[]otherArray Array to compare the subarray against.
IEqualityComparer<T>comparer Optional equality comparer.

Returns

True if the current array contains the specified subarray at the specified index; false otherwise.