DataTable.ToString DataTable.ToString DataTable.ToString DataTable.ToString Method

Definición

Obtiene TableName y DisplayExpression, si hay alguna, como cadena concatenada.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

Devoluciones

Cadena compuesta por los valores TableName y DisplayExpression.A string consisting of the TableName and the DisplayExpression values.

Ejemplos

En el ejemplo siguiente se TableName devuelve DisplayExpression y se ToString usa el método.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

Comentarios

Obtiene el TableName y DisplayExpression para. DataTableGets the TableName and DisplayExpression for the DataTable.

Se aplica a

Consulte también: