Export (0) Print
Expand All

DataRowExtensions Class

Defines the extension methods to the DataRow class. This is a static class.

System::Object
  System.Data::DataRowExtensions

Namespace:  System.Data
Assembly:  System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)

[ExtensionAttribute]
public ref class DataRowExtensions abstract sealed

  NameDescription
Public methodStatic memberField<T>(DataRow, DataColumn)Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
Public methodStatic memberField<T>(DataRow, Int32)Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
Public methodStatic memberField<T>(DataRow, String)Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
Public methodStatic memberField<T>(DataRow, DataColumn, DataRowVersion)Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
Public methodStatic memberField<T>(DataRow, Int32, DataRowVersion)Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
Public methodStatic memberField<T>(DataRow, String, DataRowVersion)Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
Public methodStatic memberSetField<T>(DataRow, DataColumn, T)Sets a new value for the specified column in the DataRow. The SetField method also supports nullable types.
Public methodStatic memberSetField<T>(DataRow, Int32, T)Sets a new value for the specified column in the DataRow the method is called on. The SetField method also supports nullable types.
Public methodStatic memberSetField<T>(DataRow, String, T)Sets a new value for the specified column in the DataRow. The SetField method also supports nullable types.
Top

The DataSet API has been extended with two new methods of the DataRow class, Field and SetField. You can use these to form Language-Integrated Query (LINQ) expressions and method queries against DataTable objects. They are the recommended methods to use for accessing column values within Language-Integrated Query (LINQ) expressions and method queries. For more information, see Generic Field and SetField Methods (LINQ to DataSet).

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft