Select Method on a DataTable

I thought I would bring this up as an FYI.  This method is very useful for doing in memory searches of your DataTables.  The Select method takes a filter expression as a parameter and returns an array of DataRows that can be looped through.  It’s also a very easy way to determine if certain rows exist in your DataTable.  If you do the select and the length of the array returned is zero, then no rows exist and you can move on.  I’ve used it a few times and thought I’d pass it along.

Posted in |