BindingContext.ICollection.CopyTo(Array, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies the elements of the collection into a specified array, starting at the collection index.
virtual void System.Collections.ICollection.CopyTo(Array ^ ar, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array ar, int index);
abstract member System.Collections.ICollection.CopyTo : Array * int -> unit
override this.System.Collections.ICollection.CopyTo : Array * int -> unit
Sub CopyTo (ar As Array, index As Integer) Implements ICollection.CopyTo
Parameters
- index
- Int32
The collection index to begin copying from.
Implements
Examples
private:
void CopyToArray()
{
// Declare the array.
array<Object^>^ myArray = gcnew array<Object^>(100);
( (ICollection^)(this->BindingContext) )->CopyTo( myArray, 0 );
}
private void CopyToArray(){
// Declare the array.
object [] myArray = new object [100];
((ICollection)this.BindingContext).CopyTo(myArray, 0);
}
Private Sub CopyToArray()
' Declare the array.
Dim myArray(100) As Object
CType(Me.BindingContext, ICollection).CopyTo(myArray, 0)
End Sub
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET