DataColumnCollection 成员
表示 DataTable 的 DataColumn 对象的集合。
下表列出了由 DataColumnCollection 类型公开的成员。
公共属性
(请参见 受保护的属性 )
名称 | 说明 | |
---|---|---|
Count | 获取集合中的元素的总数。(从 InternalDataCollectionBase 继承。) | |
IsReadOnly | 获取一个值,该值指示 InternalDataCollectionBase 是否为只读。(从 InternalDataCollectionBase 继承。) | |
IsSynchronized | 获取一个值,该值指示 InternalDataCollectionBase 是否是同步的。(从 InternalDataCollectionBase 继承。) | |
Item | 已重载。从集合中获取指定的 DataColumn。 | |
SyncRoot | 获取可用于同步集合的对象。(从 InternalDataCollectionBase 继承。) |
页首
受保护的属性
名称 | 说明 | |
---|---|---|
List |
页首
公共方法
(请参见 受保护的方法 )
名称 | 说明 | |
---|---|---|
Add | 已重载。 创建 DataColumn 对象并将其添加到 DataColumnCollection 中。 | |
AddRange | 将指定的 DataColumn 数组的元素复制到集合末尾。 | |
CanRemove | 检查是否可从集合中移除特定列。 | |
Clear | 清除集合中的所有列。 | |
Contains | 检查集合是否包含具有指定名称的列。 | |
CopyTo | 已重载。 从指定的索引开始,将集合复制到数组。 | |
Equals | 已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。) | |
GetEnumerator | 获取集合的 IEnumerator。 (从 InternalDataCollectionBase 继承。) | |
GetHashCode | 用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。) | |
GetType | 获取当前实例的 Type。 (从 Object 继承。) | |
IndexOf | 已重载。 搜索指定的 DataColumn,并返回集合中第一个匹配项的从零开始的索引。 | |
ReferenceEquals | 确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。) | |
Remove | 已重载。 从集合中移除 DataColumn 对象。 | |
RemoveAt | 从集合中移除指定索引位置的列。 | |
ToString | 返回表示当前 Object 的 String。 (从 Object 继承。) |
页首
受保护的方法
名称 | 说明 | |
---|---|---|
Finalize | 允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。) | |
MemberwiseClone | 创建当前 Object 的浅表副本。 (从 Object 继承。) | |
OnCollectionChanged | ||
OnCollectionChanging |
页首
公共事件
名称 | 说明 | |
---|---|---|
CollectionChanged | 在由于添加或删除列而使列集合发生变化时发生。 |
页首
请参见
参考
DataColumnCollection 类
System.Data 命名空间
Columns
DataColumn 类
DataTable
DataRelation
DataRow
DataSet