System.Text.RegularExpressions.Capture Class

Assembly: System.dll
Namespace: System.Text.RegularExpressions
Summary
Represents the results from a single subexpression capture.Capture represents one substring for a single successful capture.
C# Syntax:
[Serializable]
public class Capture
Remarks
The object is immutable and has no public constructor. Instances are returned through the collection returned by Group.Captures. The Match and Group classes extend Capture.
See also:
System.Text.RegularExpressions Namespace

System.Text.RegularExpressions.Capture Member List:

Public Properties
Index Read-only

The position in the original string where the first character of the captured substring was found.
Length Read-only

The length of the captured substring.
Value Read-only

Gets the captured substring from the input string.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString Overridden:
Gets the captured substring from the input string.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Text.RegularExpressions.Capture Member Details

Property: Index (read-only)
Summary
The position in the original string where the first character of the captured substring was found.
C# Syntax:
public int Index {get;}

Return to top


Property: Length (read-only)
Summary
The length of the captured substring.
C# Syntax:
public int Length {get;}

Return to top


Property: Value (read-only)
Summary
Gets the captured substring from the input string.
C# Syntax:
public string Value {get;}

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~Capture();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: ToString()
Summary
Gets the captured substring from the input string.
C# Syntax:
public override string ToString();
Return Value:
The actual substring that was captured by the match.
Remarks
ToString is actually an internal call to Capture.Value.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.