Class ArrayExtensions
- Namespace
- TypedRest
- Assembly
- TypedRest.Reactive.dll
Provides extension methods for arrays.
public static class ArrayExtensions
- Inheritance
-
ArrayExtensions
- Inherited Members
Methods
IndexOfPattern<T>(T[], T[], int, int)
Searches for the starting index of a specific pattern/sequence in the array.
public static int IndexOfPattern<T>(this T[] array, T[] pattern, int startIndex = 0, int count = 2147483647) where T : IEquatable<T>
Parameters
arrayT[]The array to search.
patternT[]The pattern to search for.
startIndexintThe starting index of the search.
countintThe maximum number of elements in the array to search.
Returns
- int
The start index of the first occurrence of the pattern, if found; otherwise, –1.
Type Parameters
TThe type of the elements of the array.