Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)

public:
array<DataRow^>^ Select(
	String^ filterExpression
)

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: array<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:
© 2017 Microsoft