Table of Contents

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

array T[]

The array to search.

pattern T[]

The pattern to search for.

startIndex int

The starting index of the search.

count int

The 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

T

The type of the elements of the array.