Click or drag to resize

DataColumnCollectionEnsureExistence Method

Either returns an existing column with name columnname and type expectedtype or creates a new column of the provided type.

Namespace: Altaxo.Data
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public DataColumn EnsureExistence(
	string columnname,
	Type expectedcolumntype,
	ColumnKind kind,
	int groupNumber
)

Parameters

columnname  String
The column name.
expectedcolumntype  Type
Expected type of the column.
kind  ColumnKind
Only used when a new column is created.
groupNumber  Int32
Only used when a new column is created.

Return Value

DataColumn
Either an existing column of name columnname and type expectedtype. If this is not the case, a new column with a similar name and the expectedtype is created and added to the collection. The new column is returned then.
See Also