DataRelation.ToString 方法

定义

获取 RelationName(如果存在)。Gets the RelationName, if one exists.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

返回

String

RelationName 属性的值。The value of the RelationName property.

示例

下面的示例使用 ToString 属性返回对象的名称 DataRelationThe following example uses the ToString property to return the name of the DataRelation object.

private void PrintName(DataRelation relation)
{
    // Print the name of the DataRelation.
    Console.WriteLine(relation.ToString());
}
Private Sub PrintName(relation As DataRelation)
    ' Print the name of the DataRelation.
      Console.WriteLine(relation.ToString())
End Sub

适用于

另请参阅