BuildProviderCollection.RemoveAt(Int32) 方法

定义

BuildProvider 中指定索引处移除 BuildProviderCollection 对象。Removes the BuildProvider object at the specified index from the BuildProviderCollection.

public:
 void RemoveAt(int index);
public void RemoveAt (int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

参数

index
Int32

整数值,指定 BuildProvider 中的特定 BuildProviderCollection 对象的位置。An integer value specifying the location of a specific BuildProvider object within the BuildProviderCollection.

示例

下面的代码示例演示如何使用 RemoveAt 方法。The following code example demonstrates how to use the RemoveAt method. 此代码示例是为类提供的更大示例的一部分 BuildProviderCollectionThis code example is part of a larger example provided for the BuildProviderCollection class.

// Remove an BuildProvider.
configSection.BuildProviders.RemoveAt(
  configSection.BuildProviders.Count - 1);
' Remove an BuildProvider.
configSection.BuildProviders.RemoveAt( _
  configSection.BuildProviders.Count - 1)

注解

如果索引未 BuildProvider 在集合中指定,则将引发超出范围的异常。If the index does not specify a BuildProvider in the collection, an out-of-range exception is thrown.

适用于