Regex.Caps Property

Definition

Important

This API is not CLS-compliant.

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

C#
[System.CLSCompliant(false)]
protected System.Collections.IDictionary? Caps { get; set; }
C#
protected System.Collections.IDictionary Caps { get; set; }
C#
[System.CLSCompliant(false)]
protected System.Collections.IDictionary Caps { get; set; }

Property Value

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

Attributes

Exceptions

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

Remarks

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.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.6, 2.0, 2.1