DataControlFieldCollection.CopyTo(DataControlField[], Int32) 方法

定義

從目標陣列的指定之索引開始,將整個 DataControlFieldCollection 集合複製到相容的一維 ArrayCopies the entire DataControlFieldCollection collection to a compatible one-dimensional Array, starting at the specified index of the target array.

public:
 void CopyTo(cli::array <System::Web::UI::WebControls::DataControlField ^> ^ array, int index);
public void CopyTo (System.Web.UI.WebControls.DataControlField[] array, int index);
override this.CopyTo : System.Web.UI.WebControls.DataControlField[] * int -> unit
Public Sub CopyTo (array As DataControlField(), index As Integer)

參數

array
DataControlField[]

一維 Array,是從 DataControlFieldCollection 複製過來之項目的目的端。The one-dimensional Array that is the destination of the elements copied from DataControlFieldCollection. Array 必須有以零為起始的索引。The Array must have zero-based indexing.

index
Int32

array 中以零起始的索引,即開始複製的位置。The zero-based index in array at which copying begins.

例外狀況

arraynullarray is null.

index 小於零。index is less than zero.

array 是多維的。array is multidimensional.

-或--or- 來源 DataControlFieldCollection 集合中的欄位數目大於從 index 到目的陣列末端的可用空間。The number of fields in the source DataControlFieldCollection collection is greater than the available space from index to the end of the destination array.

適用於

另請參閱