alphaa2001 (1) [Avatar] Offline
Hi All.

I have Dynamic Datatable and i want to extract Distinct Rows Based on certain number of Columns

Now number of Columns is dynamic

I m using tryingto use LINQ to achieve this

I am using

var distinctRows = (from DataRow dRow in dt.Rows
select new {col1 = dRow["T0"], col2 = dRow["T1"], col3 = dRow["T2"], col4 = dRow["T3"] }).Distinct();

where this Datatable has 4 columns on which i need Distinct query but i need a generic solution where Number of Columns Can be flexible??

Any help??