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




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

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

You can help support asp.net.ph