Synopsis
string constraintName
= Constraint.ConstraintName;
Constraint.ConstraintName = constraintName
;
This is the name that identifies a Constraint
.
It’s primarily used to retrieve or remove a
Constraint
object by name from the
ConstraintCollection
.
Example
The following code snippet displays the
ConstraintName
for every
Constraint
in a DataTable
:
foreach(Constraint c in dt.Constraints)
{
Console.WriteLine(c.ConstraintName);
}