NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataColumn.ToString

Returns the Expression of the column, if one exists.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();
[C++]
public: override String* ToString();
[JScript]
public override function ToString() : String;

Return Value

The Expression value, if the property is set; otherwise, the ColumnName property.

Example [Visual Basic]

The following example uses the ToString property to return the default string of each member of a collection of DataColumn objects.

[Visual Basic]

Private Sub PrintColumns(myTable As DataTable)
   Dim dc As DataColumn
   For Each c In myTable.Columns
      Console.WriteLine(c.Ordinal, c.ToString)
   Next
End Sub

See Also

DataColumn Class | DataColumn Members | System.Data Namespace | Expression | ColumnName