This documentation is archived and is not being maintained.

CaptureCollection.Item Property

Gets an individual member of the collection.

[C#] In C#, this property is the indexer for the CaptureCollection class.

[Visual Basic]
Public Default ReadOnly Property Item( _
   ByVal i As Integer _
) As Capture
public Capture this[
 int i
] {get;}
public: __property Capture* get_Item(
 int i
returnValue = CaptureCollectionObject.Item(i);
returnValue = CaptureCollectionObject(i);

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [JScript]

Index into the capture collection.

Parameters [Visual Basic, C#, C++]

Index into the capture collection.

Property Value

The captured substring at position i in the collection.


Exception Type Condition
ArgumentOutOfRangeException i is less than 0 or greater than Count.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

CaptureCollection Class | CaptureCollection Members | System.Text.RegularExpressions Namespace