DataTable removes repeated values from the column

Source: Internet
Author: User

DataTable removes repeated values from the column

DataTable dtPCI = dtblSourceData. DefaultView. ToTable (true, new string [] {"Server Cell PCI "});

 

Create and return a new able Based on the rows in the existing DataView.

Namespace:System. Data

Assembly:System. Data (in System. Data. dll) parameter
TableName
Type: System. String
The name of the returned DataTable.
Distinct
Type: System. Boolean
If true, the returned DataTable will contain rows with different values for all columns. The default value is false.
ColumnNames
Type: System. String []
A string array that contains the list of column names to be included in the returned DataTable. DataTable contains the specified columns in the same order as these columns in the array.
Return Value Type: System. Data. DataTable
A new able instance contains the requested rows and columns. Note: If you must retrieve different values from the subsets of available columns, use this overload version of The ToTable method to specify a new name for the returned DataTable. If you do not need a subset of different rows or columns, see ToTable.

Related Article

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.