DataRow Field Operators

In addition to the DataRow-specific comparer class for the set-type operators, there is a need for some DataRow-specific operators. These operators are defined in the System.Data.DataSetExtensions.dll assembly, in the static System.Data.DataRowExtensions class.

You have no doubt noticed that in virtually every example thus far, I have used the Field<T> operator to extract a DataColumn object's value from a DataRow. There are two purposes for this operator: correct equality comparisons and null value handling.

With DataRow objects, we have a problem. Their DataColumn values do not get compared properly for equality when they are accessed with the DataRow object's indexer if the column is a value-type. The reason is that ...

Get Pro LINQ: Language Integrated Query in C# 2008 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.