Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11631

Filter all rows having same value in three columns using DataTable.Select

$
0
0

I have three columns in my Datatable and I want to filter all the rows where all the three columns do not have the same value.

Currently I am doing it like this

dataTable.Select("Col1!=Col2 or Col1!=Col3 or Col2!=Col3");

But I am wondering if there is any shortcut way to do this?Because this approach will grow exponentially if number of columns increases


Viewing all articles
Browse latest Browse all 11631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>