Regex.Caps Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a dictionary that maps numbered capturing groups to their index values.

This API is not CLS-compliant.

Namespace:   System.Text.RegularExpressions
Assembly:  System (in System.dll)

[CLSCompliantAttribute(false)]
protected IDictionary Caps { get; set; }

Property Value

Type: System.Collections.IDictionary

A dictionary that maps numbered capturing groups to their index values.

Exception Condition
ArgumentNullException

The value assigned to the Caps property in a set operation is null.

Note that this property is protected; it can only be accessed from a class derived from the Regex class.

A set operation attempts to convert the value assigned to the property to a Hashtable object; if this conversion fails, it calls the Hashtable.Hashtable(IDictionary) constructor.

.NET Framework
Available since 4.7.1
Return to top
Show: