HttpHandlerActionCollection.RemoveAt(Int32) 方法
定义
从集合中的指定索引处移除 HttpHandlerAction 对象。Removes an HttpHandlerAction object at the specified index location from the collection.
public:
void RemoveAt(int index);
public void RemoveAt (int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
参数
- index
- Int32
要移除的对象的集合索引。The collection index of the object to remove.
例外
集合中指定索引处没有 HttpHandlerAction 对象,该元素已移除或者该集合为只读。There is no HttpHandlerAction object at the specified index in the collection, the element has already been removed, or the collection is read-only.
示例
下面的代码示例演示如何 HttpHandlerAction 从集合中删除对象。The following code example shows how to remove an HttpHandlerAction object from the collection.
// Remove a HttpHandlerAction object with 0 index.
httpHandlers.RemoveAt(0);
' Remove a HttpHandlerAction object with 0 index.
httpHandlers.RemoveAt(0)
注解
此方法会将一个 remove 元素插入到配置文件的相应部分,该部分是在更高级配置文件中定义的任何元素。This method inserts a remove element into the appropriate section of the configuration file for any element defined in a higher-level configuration file. 如果在当前配置文件的相应部分中定义了元素,则会从配置文件中删除其条目。If the element is defined in the appropriate section of the current configuration file, its entry is removed from the configuration file. 集合中必须存在要删除的对象。The object to remove must exist in the collection.