The UniqueConstraint Class
You use an object of the UniqueConstraint class to ensure that a DataColumn value, or
combination of DataColumn values, is unique for each DataRow in a DataTable. The
UniqueConstraint class is derived from the System.Data.Constraint class. Table 12.1
shows the UniqueConstraint properties.
Table 12.1: UniqueConstraint PROPERTIES
PROPERTY TYPE DESCRIPTION
Columns DataColumn Gets the array of DataColumn objects for the
ConstraintName string Gets the name of the UniqueConstraint.
ExtendedProperties PropertyCollection Gets the PropertyCollection object that you can
use to store strings of additional information.
IsPrimaryKey bool Gets a bool that indicates whether the
UniqueConstraint is a primary key.
Table DataTable Gets the DataTable on which the
UniqueConstraint was created.