[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents the results from a single successful subexpression capture.
Assembly: System.Text.RegularExpressions (in System.Text.RegularExpressions.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Retrieves the captured substring from the input string by calling the Value property. (Overrides Object..::..ToString()()()().)|
A object is immutable and has no public constructor. Instances are returned through the CaptureCollection object, which is returned by the Match.Captures and Group..::..Captures properties. However, the Match.Captures property provides information about the same match as the Match object.
If you do not apply a quantifier to a capturing group, the Group..::..Captures property returns a CaptureCollection with a single object that provides information about the same capture as the Group object. If you do apply a quantifier to a capturing group, the Group.Index, Group.Length, and Group.Value properties provide information only about the last captured group, whereas the objects in the CaptureCollection provide information about all subexpression captures. The example provides an illustration.