Regex.CapNames 属性
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重要
此 API 不符合 CLS。
获取或设置将命名捕获组映射到其索引值的字典。
protected:
property System::Collections::IDictionary ^ CapNames { System::Collections::IDictionary ^ get(); void set(System::Collections::IDictionary ^ value); };
C#
[System.CLSCompliant(false)]
protected System.Collections.IDictionary? CapNames { get; set; }
C#
protected System.Collections.IDictionary CapNames { get; set; }
C#
[System.CLSCompliant(false)]
protected System.Collections.IDictionary CapNames { get; set; }
[<System.CLSCompliant(false)>]
member this.CapNames : System.Collections.IDictionary with get, set
member this.CapNames : System.Collections.IDictionary with get, set
Protected Property CapNames As IDictionary
将命名捕获组映射到其索引值的字典。
- 属性
向设置操作中的 CapNames 属性分配的值是 null
。
请注意,此属性受保护;只能从派生自该类的 Regex 类访问它。
设置操作尝试将分配给属性 Hashtable 的值转换为对象;如果此转换失败,它将调用 Hashtable.Hashtable(IDictionary) 构造函数。
产品 | 版本 |
---|---|
.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 |
.NET Framework | 4.7.1, 4.7.2, 4.8 |
.NET Standard | 1.6, 2.0, 2.1 |