An optional method for structure import between datatable tables

Source: Internet
Author: User
Datatable. COPY method [C #]
Copy the structure and data of the datatable.
[Visual Basic]
Public Function copy () as datatable
[C #]
Public datatable copy ();
Return Value
The new able, which has the same structure (Table architecture and constraints) and data as the datatable.
Note that if these classes have been derived, the copies also have the same Derived classes.
Example
[Visual Basic, C #] the following example uses the copy method to create a copy of the initial able.
[Visual Basic]
Private sub copydatatable (byval mydatatable as datatable)
'Create an object variable for the copy.
Dim copydatatable as datatable
Copydatatable = mydatatable. Copy ()
'Insert code to work with the copy.
End sub
[C #]
Private void copydatatable (datatable mydatatable ){
// Create an object variable for the copy.
Datatable copydatatable;
Copydatatable = mydatatable. Copy ();
// Insert code to work with the copy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.