NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataTable.Select ()

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[];

Return Value

An array of DataRow objects.

Remarks

The method returns the current rows in order of primary key (or lacking one, order of addition.)

Example [Visual Basic]

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

See Also

DataTable Class | DataTable Members | System.Data Namespace | DataTable.Select Overload List | CaseSensitive | DataRow