Returns an array of all DataRow objects.
[Visual Basic] Overloads Public Function Select() As DataRow () [C#] public DataRow[] Select(); [C++] public: DataRow* Select() []; [JScript] public function Select() : DataRow[];
An array of DataRow objects.
The method returns the current rows in order of primary key (or lacking one, order of addition.)
The following example returns an array of DataRow objects through the Select method.
[Visual Basic]
Private Sub GetRows() Dim myRows() As DataRow Dim t As DataTable ' Get the DataTable of a DataSet. t = DataSet1.Tables("Suppliers") myRows = t.Select() Dim i As Integer ' Print the value one column of each DataRow. For i = 0 to UBound(myRows) Console.WriteLine(myRows(i)("CompanyName")) Next i End Sub
DataTable Class | DataTable Members | System.Data Namespace | DataTable.Select Overload List | CaseSensitive | DataRow