DataTable.ToString メソッド

定義

TableNameDisplayExpression が連結された文字列として存在する場合は、これらを取得します。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

戻り値

TableNameDisplayExpression 値で構成された文字列。A string consisting of the TableName and the DisplayExpression values.

次の例ではTableNameDisplayExpression ToStringメソッドを使用してとを返します。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

注釈

TableNameのおよびDisplayExpressionDataTable取得します。Gets the TableName and DisplayExpression for the DataTable.

適用対象

こちらもご覧ください