Constraint::ConstraintName Property
.NET Framework (current version)
The name of a constraint in the ConstraintCollection.
Assembly: System.Data (in System.Data.dll)
public: property String^ ConstraintName { virtual String^ get(); virtual void set(String^ value); }
| Exception | Condition |
|---|---|
| ArgumentException | The Constraint name is a null value or empty string. |
| DuplicateNameException | The ConstraintCollection already contains a Constraint with the same name (The comparison is not case-sensitive.). |
The ConstraintCollection is returned by the Constraints property of the DataTable class.
The following example iterates through the ConstraintCollection of a DataTable and prints each ConstraintName.
.NET Framework
Available since 1.1
Available since 1.1
Show: