IEnumerableExtensionsIndexOfT(IEnumerableT, IEnumerableT, Int32) Method
Searches for the specified object pattern and returns the zero-based index of the first occurrence within the
entire IEnumerableT.
Namespace: DevCase.Extensions.IEnumerableExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static int IndexOf<T>(
this IEnumerable<T> sender,
IEnumerable<T> pattern,
int startIndex
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function IndexOf(Of T) (
sender As IEnumerable(Of T),
pattern As IEnumerable(Of T),
startIndex As Integer
) As Integer
Dim sender As IEnumerable(Of T)
Dim pattern As IEnumerable(Of T)
Dim startIndex As Integer
Dim returnValue As Integer
returnValue = sender.IndexOf(pattern,
startIndex)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static int IndexOf(
IEnumerable<T>^ sender,
IEnumerable<T>^ pattern,
int startIndex
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member IndexOf :
sender : IEnumerable<'T> *
pattern : IEnumerable<'T> *
startIndex : int -> int
No code example is currently available or this language may not be supported.
- sender IEnumerableT
-
The source IEnumerableT.
- pattern IEnumerableT
-
The object pattern to locate in the IEnumerableT.
- startIndex Int32
-
The zero-based starting index of the search.
- T
Int32
The zero-based index of the first occurrence of object pattern within the entire
IEnumerableT,
if found; otherwise, –1.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
MsgBox({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}.IndexOf(pattern:={5, 6, 7}, index:=5))
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.