C# DataTable select method
DataTable has a Select method. This method receives a string expression that specifies what rows you want to handle.
Selection based on a string expression
DataRow[] result = table.Select("Size >= 230 AND Sex = 'm'");
Selection based on DateTime
DataRow[] result = table.Select("Date > #6/1/2001#");
Number of records for a particular criteria
int numberOfRecords = table.Select("IsActive = 'Y'").Length;
Comments
Hi, This is help full post for c# developer Thanks for sharing