ReadOnlyStringCollection.CopyTo(String[], Int32) 方法
定义
public:
void CopyTo(cli::array <System::String ^> ^ values, int index);
public void CopyTo (string[] values, int index);
member this.CopyTo : string[] * int -> unit
Public Sub CopyTo (values As String(), index As Integer)
参数
- values
- String[]
接收此集合元素的 String 对象的数组。The array of String objects that receives the elements of this collection.
- index
- Int32
values 中从零开始的索引,此方法从该位置开始复制此集合。The zero-based index in values where this method starts copying this collection.
例外
对于源集合的大小和指定的 index 而言,目标数组不够大。The destination array is not large enough, based on the source collection size and the index specified.
values 为 null。values is null.
指定的 index 超出了目标数组的范围。The index specified is out of range of the destination array.