asp.net.ph

DataTable.ToString Method

System.Data Namespace   DataTable Class


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

[ VB ]Overrides Public Function ToString ( ) As String

[ C# ]
Public override String ToString ( );

[ C++ ]
Public: String* ToString ( );

[ JScript ]
Public override function ToString ( ) : String;

Return Value

A string consisting of the TableName and the DisplayExpression values.

Remarks

Returns the TableName and DisplayExpression for the DataTable.

Example

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

private void PrintToString ( DataSet ds ) {

   foreach ( DataTable myTable in ds.Tables ) {
      Response.Write ( myTable.ToString ( ) );
   }
}
  C# VB

See Also

DataTable Members   DisplayExpression   TableName Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note