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;
The Expression value, if the property is set; otherwise, the ColumnName property.
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
DataColumn Class | DataColumn Members | System.Data Namespace | Expression | ColumnName