Constraint.ConstraintName Constraint.ConstraintName Constraint.ConstraintName Constraint.ConstraintName Property

Definición

Nombre de una restricción en el ConstraintCollection.The name of a constraint in the ConstraintCollection.

public:
 virtual property System::String ^ ConstraintName { System::String ^ get(); void set(System::String ^ value); };
[System.Data.DataSysDescription("ConstraintNameDescr")]
public virtual string ConstraintName { get; set; }
member this.ConstraintName : string with get, set
Public Overridable Property ConstraintName As String

Valor de propiedad

Nombre del objeto Constraint.The name of the Constraint.

Excepciones

El nombre de Constraint es un valor nulo o una cadena vacía.The Constraint name is a null value or empty string.

ConstraintCollection ya contiene un Constraint con el mismo nombre (la comparación no distingue entre mayúsculas y minúsculas).The ConstraintCollection already contains a Constraint with the same name (The comparison is not case-sensitive.).

Ejemplos

En el siguiente ejemplo se recorre ConstraintCollection en iteración la de ConstraintNamee imprime cada una DataTable de ellas.The following example iterates through the ConstraintCollection of a DataTable and prints each ConstraintName.

private void PrintConstraintNames(DataTable myTable){
   foreach(Constraint cs in myTable.Constraints){
      Console.WriteLine(cs.ConstraintName);
   }
}
Private Sub PrintConstraintNames(myTable As DataTable)
    Dim cs As Constraint
    For Each cs In  myTable.Constraints
        Console.WriteLine(cs.ConstraintName)
    Next cs
End Sub

Comentarios

La ConstraintCollection Constraints propiedad de laDataTable clase devuelve el.The ConstraintCollection is returned by the Constraints property of the DataTable class.

Se aplica a