" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi
To get distinct column values from a DataTable, we can use the DefaultView.ToTable method. It will allow to get distinct values as a new DataTable.
Datatable dtUnique = dtDuplicates.DefalutView.ToTable(true,”columnName1″);
The first parameter is a Boolean , if true returns distinct values. The 2nd parameter is the name of the column which needs to be evaluated for distinct values.
Mail (will not be published) (required)
Enter Captcha Code *
4 + five =
Burn Ignorance is a knowledge initiative by Mindfire Solutions
Subscribe to our mailing list to get the updates to your email inbox...