PrincipalCollection.ICollection.CopyTo(Array, Int32) 方法

定义

从数组中指定的位置索引开始,将 Principal 对象从此 PrincipalCollection 复制到指定的数组中。Copies the Principal objects from this PrincipalCollection into the specified array, starting at the specified position index in array.

 virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array array, int index);
[System.Security.SecurityCritical]
void ICollection.CopyTo (Array array, int index);

参数

array
Array

应使用 Principal 对象填充的 T:System.Array。The T:System.Array that should be populated with Principal objects.

index
Int32

应将第一个 Principal 对象复制到其中的 array 中的位置。The position in array to which the first Principal object should be copied to.

实现

属性

注解

array 必须为一维。array must be one-dimensional. 如果不是,则会引发 ArgumentExceptionIf it is not, an ArgumentException is thrown. 如果要复制的元素数大于从 index 到 @no__t 的末尾的可用空间(如果 @no__t @no__t 为-2,则为; 如果 @no__t 大于0,则会引发更多异常。Further exceptions are thrown if the number of elements to copy is greater than the available space from index to the end of array, if array is null, or if index is less than 0.

适用于