IEnumerableExtensionsIndexOfAllT(IEnumerableT, T, Int32) Method
Searches for the specified object and returns the zero-based indices of all the 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 IEnumerable<int> IndexOfAll<T>(
this IEnumerable<T> sender,
T value,
int startIndex
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function IndexOfAll(Of T) (
sender As IEnumerable(Of T),
value As T,
startIndex As Integer
) As IEnumerable(Of Integer)
Dim sender As IEnumerable(Of T)
Dim value As T
Dim startIndex As Integer
Dim returnValue As IEnumerable(Of Integer)
returnValue = sender.IndexOfAll(value,
startIndex)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static IEnumerable<int>^ IndexOfAll(
IEnumerable<T>^ sender,
T value,
int startIndex
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member IndexOfAll :
sender : IEnumerable<'T> *
value : 'T *
startIndex : int -> IEnumerable<int>
No code example is currently available or this language may not be supported.
- sender IEnumerableT
-
The source IEnumerableT.
- value T
-
The object to locate in the IEnumerableT.
- startIndex Int32
-
The zero-based starting index of the search.
- T
IEnumerableInt32
The zero-based index of all the occurrences of object within the entire
IEnumerableT,
if found; otherwise,
.
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(String.Join(", ", {0, 1, 2, 3, 4, 5, 6, 5, 5, 9}.IndexOfAll(value:=5, 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.
ArgumentOutOfRangeException
|
index;Value equals or bigger than 0 is required.
or
count;Value bigger than 0 is required.
or
count;Value equals or bigger than the pattern length is required.
|