DataTable.Select Method ()
.NET Framework (current version)
Gets an array of all DataRow objects.
Assembly: System.Data (in System.Data.dll)
The following example returns an array of DataRow objects through the Select method.
Private Sub GetRows() ' Get the DataTable of a DataSet. Dim table As DataTable = DataSet1.Tables("Suppliers") Dim rows() As DataRow = table.Select() Dim i As Integer ' Print the value one column of each DataRow. For i = 0 to rows.GetUpperBound(0) Console.WriteLine(rows(i)("CompanyName")) Next i End Sub
.NET Framework
Available since 1.1
Available since 1.1
Show: