C# Класс System.Data.DataColumnCollection

Наследование: InternalDataCollectionBase
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddAt void
AddColumnsImplementingIChangeTrackingList void
ArrayAdd void
ArrayAdd void
ArrayRemove void
AssignName string
BaseAdd void
BaseGroupSwitch void
BaseRemove void
CanRegisterName bool
CanRemove bool
CheckIChangeTracking void
Contains bool
DataColumnCollection System.Collections
EnsureAdditionalCapacity void
FinishInitCollection void
IndexOfCaseInsensitive int
MakeName string
MoveTo void
OnCollectionChanged void
OnCollectionChanging void
OnColumnPropertyChanged void
RegisterColumnName void
RemoveColumnsImplementingIChangeTrackingList void
UnregisterName void
this DataColumn

Открытые методы

Метод Описание
Add ( ) : DataColumn

Creates and adds a to a columns collection.

Add ( string columnName ) : DataColumn

Creates and adds a with the specified name to the columns collection.

Add ( string columnName, Type type ) : DataColumn

Creates and adds a with the specified name and type to the columns collection.

Add ( string columnName, Type type, string expression ) : DataColumn

Creates and adds a with the specified name, type, and compute expression to the columns collection.

Add ( DataColumn column ) : void

Adds the specified to the columns collection.

AddRange ( DataColumn columns ) : void
CanRemove ( DataColumn column ) : bool

Checks if a given column can be removed from the collection.

Clear ( ) : void

Clears the collection of any columns.

Contains ( string name ) : bool

Checks whether the collection contains a column with the specified name.

CopyTo ( DataColumn array, int index ) : void
IndexOf ( DataColumn column ) : int

Returns the index of a specified .

IndexOf ( string columnName ) : int

Returns the index of a column specified by name.

Remove ( DataColumn column ) : void

Removes the specified from the collection.

Remove ( string name ) : void

Removes the column with the specified name from the collection.

RemoveAt ( int index ) : void

Removes the column at the specified index from the collection.

this ( int index ) : DataColumn

Gets the from the collection at the specified index.

this ( string name ) : DataColumn

Gets the from the collection with the specified name.

Приватные методы

Метод Описание
AddAt ( int index, DataColumn column ) : void
AddColumnsImplementingIChangeTrackingList ( DataColumn dataColumn ) : void
ArrayAdd ( DataColumn column ) : void

Adds the column to the columns array.

ArrayAdd ( int index, DataColumn column ) : void
ArrayRemove ( DataColumn column ) : void
AssignName ( ) : string

Creates a new default name.

BaseAdd ( DataColumn column ) : void

Does verification on the column and it's name, and points the column at the dataSet that owns this collection. An ArgumentNullException is thrown if this column is null. An ArgumentException is thrown if this column already belongs to this collection, belongs to another collection. A DuplicateNameException is thrown if this collection already has a column with the same name (case insensitive).

BaseGroupSwitch ( DataColumn oldArray, int oldLength, DataColumn newArray, int newLength ) : void

BaseGroupSwitch will intelligently remove and add tables from the collection.

BaseRemove ( DataColumn column ) : void

Does verification on the column and it's name, and clears the column's dataSet pointer. An ArgumentNullException is thrown if this column is null. An ArgumentException is thrown if this column doesn't belong to this collection or if this column is part of a relationship. An ArgumentException is thrown if another column's compute expression depends on this column.

CanRegisterName ( string name ) : bool
CanRemove ( DataColumn column, bool fThrowException ) : bool
CheckIChangeTracking ( DataColumn column ) : void
Contains ( string name, bool caseSensitive ) : bool
DataColumnCollection ( DataTable table ) : System.Collections

DataColumnCollection constructor. Used only by DataTable.

EnsureAdditionalCapacity ( int capacity ) : void
FinishInitCollection ( ) : void
IndexOfCaseInsensitive ( string name ) : int
MakeName ( int index ) : string

Makes a default name with the given index. e.g. Column1, Column2, ... Columni

MoveTo ( DataColumn column, int newPosition ) : void
OnCollectionChanged ( CollectionChangeEventArgs ccevent ) : void

Raises the event.

OnCollectionChanging ( CollectionChangeEventArgs ccevent ) : void
OnColumnPropertyChanged ( CollectionChangeEventArgs ccevent ) : void
RegisterColumnName ( string name, DataColumn column ) : void

Registers this name as being used in the collection. Will throw an ArgumentException if the name is already being used. Called by Add, All property, and Column.ColumnName property. if the name is equivalent to the next default name to hand out, we increment our defaultNameIndex. NOTE: To add a child table, pass column as null

RemoveColumnsImplementingIChangeTrackingList ( DataColumn dataColumn ) : void
UnregisterName ( string name ) : void

Unregisters this name as no longer being used in the collection. Called by Remove, All property, and Column.ColumnName property. If the name is equivalent to the last proposed default name, we walk backwards to find the next proper default name to use.

this ( string name, string ns ) : DataColumn

Описание методов

Add() публичный Метод

Creates and adds a to a columns collection.
public Add ( ) : DataColumn
Результат DataColumn

Add() публичный Метод

Creates and adds a with the specified name to the columns collection.
public Add ( string columnName ) : DataColumn
columnName string
Результат DataColumn

Add() публичный Метод

Creates and adds a with the specified name and type to the columns collection.
public Add ( string columnName, Type type ) : DataColumn
columnName string
type System.Type
Результат DataColumn

Add() публичный Метод

Creates and adds a with the specified name, type, and compute expression to the columns collection.
public Add ( string columnName, Type type, string expression ) : DataColumn
columnName string
type System.Type
expression string
Результат DataColumn

Add() публичный Метод

Adds the specified to the columns collection.
public Add ( DataColumn column ) : void
column DataColumn
Результат void

AddRange() публичный Метод

public AddRange ( DataColumn columns ) : void
columns DataColumn
Результат void

CanRemove() публичный Метод

Checks if a given column can be removed from the collection.
public CanRemove ( DataColumn column ) : bool
column DataColumn
Результат bool

Clear() публичный Метод

Clears the collection of any columns.
public Clear ( ) : void
Результат void

Contains() публичный Метод

Checks whether the collection contains a column with the specified name.
public Contains ( string name ) : bool
name string
Результат bool

CopyTo() публичный Метод

public CopyTo ( DataColumn array, int index ) : void
array DataColumn
index int
Результат void

IndexOf() публичный Метод

Returns the index of a specified .
public IndexOf ( DataColumn column ) : int
column DataColumn
Результат int

IndexOf() публичный Метод

Returns the index of a column specified by name.
public IndexOf ( string columnName ) : int
columnName string
Результат int

Remove() публичный Метод

Removes the specified from the collection.
public Remove ( DataColumn column ) : void
column DataColumn
Результат void

Remove() публичный Метод

Removes the column with the specified name from the collection.
public Remove ( string name ) : void
name string
Результат void

RemoveAt() публичный Метод

Removes the column at the specified index from the collection.
public RemoveAt ( int index ) : void
index int
Результат void

this() публичный Метод

Gets the from the collection at the specified index.
public this ( int index ) : DataColumn
index int
Результат DataColumn

this() публичный Метод

Gets the from the collection with the specified name.
public this ( string name ) : DataColumn
name string
Результат DataColumn