Monday, October 28, 2024

Distinct() on multiple columns

Distinct() is a handy function for finding unique values within a Collection.  However, it can only do this on a single column.  That limits the value unless you start to get creative on your lists.

Combining multiple columns into a single string that you can later Split() (if needed) can allow you to do a multi-column Distinct fairly easily and use the results readily as well.