DataTable.Select Method (String)

 

Gets an array of all DataRow objects that match the filter criteria.

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

member Select : 
        filterExpression:string -> DataRow[]

Parameters

filterExpression
Type: System.String

The criteria to use to filter the rows. For examples on how to filter rows, see DataView RowFilter Syntax [C#].

Return Value

Type: System.Data.DataRow[]

An array of DataRow objects.

To create the filterExpression argument, use the same rules that apply to the DataColumn class's Expression property value for creating filters.

To ensure the proper sort order, specify sort criteria with Select or Select.

If the column on the filter contains a null value, it will not be part of the result.

The following example uses a filter expression to return an array of DataRow objects.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: