CaptureCollection.IList<Capture>.IndexOf(Capture) Method

Definition

Determines the index of a specific item in the collection.

C#
int IList<Capture>.IndexOf(System.Text.RegularExpressions.Capture item);

Parameters

item
Capture

The object to locate in the collection.

Returns

The index of item if found in the list; otherwise, -1.

Implements

Remarks

If an object occurs multiple times in the list, the IndexOf method always returns the first instance found.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1