我如何编写自定义,ConfigurationSection以便它既是段处理程序又是配置元素集合?
通常,您有一个继承自的类,该类具有继承自ConfigurationSection的类型的属性,ConfigurationElementCollection然后返回继承自的类型的集合的元素ConfigurationElement.要配置它,您需要看起来像这样的XML:
<customSection>
<collection>
<element name="A" />
<element name="B" />
<element name="C" />
</collection>
</customSection>
Run Code Online (Sandbox Code Playgroud)
我想删除<collection>节点,只需:
<customSection>
<element name="A" />
<element name="B" />
<element name="C" />
<customSection>
Run Code Online (Sandbox Code Playgroud) 将枚举的List(枚举继承自int)转换为整数数组的最佳性能是什么?