ConstraintCollection 成员

表示 DataTable 的约束的集合。

下表列出了由 ConstraintCollection 类型公开的成员。

公共属性

(请参见 受保护的属性 )

  名称 说明
Public property Supported by the .NET Compact Framework Count  获取集合中的元素的总数。(从 InternalDataCollectionBase 继承。)
Public property Supported by the .NET Compact Framework IsReadOnly  获取一个值,该值指示 InternalDataCollectionBase 是否为只读。(从 InternalDataCollectionBase 继承。)
Public property Supported by the .NET Compact Framework IsSynchronized  获取一个值,该值指示 InternalDataCollectionBase 是否是同步的。(从 InternalDataCollectionBase 继承。)
Public property Supported by the .NET Compact Framework Item 已重载。从集合中获取指定的 Constraint
Public property Supported by the .NET Compact Framework SyncRoot  获取可用于同步集合的对象。(从 InternalDataCollectionBase 继承。)

页首

受保护的属性

  名称 说明
Protected property Supported by the .NET Compact Framework List  

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Add 已重载。 将 Constraint 对象添加到集合中。
Public method Supported by the .NET Compact Framework AddRange 将指定的 ConstraintCollection 数组的元素复制到集合末尾。
Public method Supported by the .NET Compact Framework CanRemove 指示是否可以移除 Constraint
Public method Supported by the .NET Compact Framework Clear 清除所有 Constraint 对象的集合。
Public method Supported by the .NET Compact Framework Contains 指示集合中是否存在按名称指定的 Constraint 对象。
Public method Supported by the .NET Compact Framework CopyTo 已重载。 
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetEnumerator  获取集合的 IEnumerator。 (从 InternalDataCollectionBase 继承。)
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework IndexOf 已重载。 获取指定的 Constraint 的索引。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Remove 已重载。 从 ConstraintCollection 中移除 Constraint
Public method Supported by the .NET Compact Framework RemoveAt 从集合中移除位于指定索引位置的 Constraint 对象。
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework OnCollectionChanged  

页首

公共事件

  名称 说明
Public event Supported by the .NET Compact Framework CollectionChanged 每当由于添加或移除 Constraint 对象而更改 ConstraintCollection 时发生。

页首

请参见

参考

ConstraintCollection 类
System.Data 命名空间
ForeignKeyConstraint
UniqueConstraint
DataRelation