EventMappingSettingsCollection.RemoveAt(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从集合中删除对象 EventMappingSettings 。
public:
void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
参数
- index
- Int32
集合中对象的索引 EventMappingSettings 。
例外
集合中没有 EventMappingSettings 具有指定索引的对象、元素已被移除或集合为只读。
示例
下面的代码示例演示如何使用 RemoveAt 该方法。 该代码示例是 HealthMonitoringSection 类中的一个较大示例的一部分。
// Remove an EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.RemoveAt(0);
' Remove an EventMappingsSettings object from the EventMappings collection property.
healthMonitoringSection.EventMappings.RemoveAt(0)
注解
此方法将元素插入 remove 到配置文件的相应节中,用于在较高级别的配置文件中定义的任何元素。 如果元素在当前配置文件的相应节中定义,则会从配置文件中删除其条目。 要删除的对象必须存在于集合中。