Regex::CapNames 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 named capturing groups to their index values.

This API is not CLS-compliant.

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

protected:
[CLSCompliantAttribute(false)]
property IDictionary^ CapNames {
	IDictionary^ get();
	void set(IDictionary^ value);
}

Property Value

Type: System.Collections::IDictionary^

A 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
Return to top
Show: