Advertisement
PatPositron

DataTableExtensions

Feb 4th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1. using System.Data;
  2.  
  3. static class DataTableExtensions
  4. {
  5.     public static void ForEveryDataRow(this DataTable dataTable, Action<DataRow> methodToPass)
  6.     {
  7.         foreach (DataRow dataRow in dataTable.Rows)
  8.         {
  9.             methodToPass(dataRow);
  10.         }
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement