BindingContext.ICollection.CopyTo(Array, Int32) Method
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;
C#
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
- index
- Int32
The collection index to begin copying from.
private:
void CopyToArray()
{
// Declare the array.
array<Object^>^ myArray = gcnew array<Object^>(100);
( (ICollection^)(this->BindingContext) )->CopyTo( myArray, 0 );
}
C#
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
Produkt | Verzie |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.
Pripomienky k produktu .NET
.NET je open-source projekt. Ak chcete poskytnúť pripomienky, vyberte prepojenie: