EntitySet<TEntity>.CopyTo(TEntity[], 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 EntitySet<TEntity> to an array.
public:
virtual void CopyTo(cli::array <TEntity> ^ array, int arrayIndex);
public void CopyTo (TEntity[] array, int arrayIndex);
abstract member CopyTo : 'Entity[] * int -> unit
override this.CopyTo : 'Entity[] * int -> unit
Public Sub CopyTo (array As TEntity(), arrayIndex As Integer)
Parameters
- array
- TEntity[]
The array to copy to.
- arrayIndex
- Int32
The starting index in the array.
Implements
Examples
The following example shows one use of this method:
var customer = (from c in db.Customers
where c.CustomerID == "ALFKI"
select c).Single();
var orderArray = new Order[customer.Orders.Count];
customer.Orders.CopyTo(orderArray,0);
Dim customer = (From c In db.Customers _
Where c.CustomerID = "ALFKI" _
Select c).[Single]()
Dim orderArray As New Order(customer.Orders.Count - 1) {}
customer.Orders.CopyTo(orderArray, 0)
Applies to
Sadarbojieties ar mums vietnē GitHub
Šī satura avotu var atrast vietnē GitHub, kur varat arī izveidot un pārskatīt problēmas un atgādāšanas pieprasījumus. Lai iegūtu papildinformāciju, skatiet mūsu līdzstrādnieku rokasgrāmatu.
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par