DataTable.ToString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the TableName and DisplayExpression, if there is one as a concatenated string.
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Returns
A string consisting of the TableName and the DisplayExpression values.
Examples
The following example returns the TableName and DisplayExpression using the ToString method.
private void PrintToString(DataSet dataSet)
{
foreach(DataTable table in dataSet.Tables)
{
Console.WriteLine(table.ToString());
}
}
Private Sub PrintToString(dataSet As DataSet)
Dim table As DataTable
For Each table In dataSet.Tables
Console.WriteLine(table.ToString())
Next
End Sub
Remarks
Gets the TableName and DisplayExpression for the DataTable.
Applies to
See also
Surađujte s nama na GitHubu
Izvor za ovaj sadržaj možete pronaći na GitHubu, gdje možete stvarati i pregledavati probleme i zahtjeve za povlačenjem. Dodatne informacije potražite u našem vodiču za suradnike.