DataColumnCollection 成员

表示 DataTableDataColumn 对象的集合。

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

公共属性

(请参见 受保护的属性 )

  名称 说明
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 已重载。从集合中获取指定的 DataColumn
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 已重载。 创建 DataColumn 对象并将其添加到 DataColumnCollection 中。
Public method Supported by the .NET Compact Framework AddRange 将指定的 DataColumn 数组的元素复制到集合末尾。
Public method Supported by the .NET Compact Framework CanRemove 检查是否可从集合中移除特定列。
Public method Supported by the .NET Compact Framework Clear 清除集合中的所有列。
Public method Supported by the .NET Compact Framework Contains 检查集合是否包含具有指定名称的列。
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 已重载。 搜索指定的 DataColumn,并返回集合中第一个匹配项的从零开始的索引。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Remove 已重载。 从集合中移除 DataColumn 对象。
Public method Supported by the .NET Compact Framework RemoveAt 从集合中移除指定索引位置的列。
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  
Protected method Supported by the .NET Compact Framework OnCollectionChanging  

页首

公共事件

  名称 说明
Public event Supported by the .NET Compact Framework CollectionChanged 在由于添加或删除列而使列集合发生变化时发生。

页首

请参见

参考

DataColumnCollection 类
System.Data 命名空间
Columns
DataColumn 类
DataTable
DataRelation
DataRow
DataSet