Читати англійською Редагувати

Поділитися через


DataTable.ToString Method

Definition

Gets the TableName and DisplayExpression, if there is one as a concatenated string.

C#
public override string ToString();

Returns

A string consisting of the TableName and the DisplayExpression values.

Examples

The following example returns the TableName and DisplayExpression using the ToString method.

C#
private void PrintToString(DataSet dataSet)
{
    foreach(DataTable table in dataSet.Tables)
    {
        Console.WriteLine(table.ToString());
    }
}

Remarks

Gets the TableName and DisplayExpression for the DataTable.

Applies to

See also