O'Reilly logo

Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required