Finds the index after or at a given start index of the first occurrence of a given sequence as a slice.
If this sequence represents an infinite set or series and doesn't contain slice, this will never return!
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public int IndexOfSlice(
IEnumerable<T> slice,
int from
)
public int IndexOfSlice(
IEnumerable<T> slice,
int from
)
Public Function IndexOfSlice (
slice As IEnumerable(Of T),
from As Integer
) As Integer
Public Function IndexOfSlice (
slice As IEnumerable(Of T),
from As Integer
) As Integer
public:
virtual int IndexOfSlice(
IEnumerable<T>^ slice,
int from
) sealed
public:
virtual int IndexOfSlice(
IEnumerable<T>^ slice,
int from
) sealed
abstract IndexOfSlice :
slice : IEnumerable<'T> *
from : int -> int
override IndexOfSlice :
slice : IEnumerable<'T> *
from : int -> int
abstract IndexOfSlice :
slice : IEnumerable<'T> *
from : int -> int
override IndexOfSlice :
slice : IEnumerable<'T> *
from : int -> int
Parameters
- slice
- Type: System.Collections.Generic IEnumerable T
The sequence to search for.
- from
- Type: System Int32
The start index.
Return Value
Type:
Int32The index of the first occurrence of
slice if any is found; otherwise, -1.
Implements
ISequence T IndexOfSlice(IEnumerable T , Int32)See Also