Regex.CapNames Property
![]() |
---|
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 named capturing groups to their index values.
This API is not CLS-compliant.
Assembly: System (in System.dll)
Property Value
Type: System.Collections.IDictionaryA dictionary that maps named capturing groups to their index values.
Exception | Condition |
---|---|
ArgumentNullException | The value assigned to the CapNames 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
Available since 4.7.1
Show: