Export (0) Print
Expand All

Constraint.ToString Method

Gets the ConstraintName, if there is one, as a string.

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

Return Value

The string value of the ConstraintName.

Example

[Visual Basic, C#, C++] The following example returns the ConstraintName using the ToString method.

[Visual Basic] 
Private Sub PrintToString(myConstraint As Constraint)
 
    Console.WriteLine(myConstraint.ToString())
   
End Sub

[C#] 
private void PrintToString(Constraint myConstraint)
{
    Console.WriteLine(myConstraint.ToString());
}

[C++] 
private:
void PrintToString(Constraint* myConstraint)
{
    Console::WriteLine(myConstraint);
}

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Constraint Class | Constraint Members | System.Data Namespace

Show:
© 2014 Microsoft