ColumnCollection.Add ColumnCollection.Add Method

Definition

Adds a Column object to the ColumnCollection collection.

Overloads

Add(Column) Add(Column)

Adds a Column object to the ColumnCollection collection.

Add(Column, Int32) Add(Column, Int32)

Adds a Column object to the ColumnCollection collection at a specified position.

Add(Column, String) Add(Column, String)

Adds a Column object to the ColumnCollection collection after a specified Column object currently in the ColumnCollection collection.

Add(Column) Add(Column)

Adds a Column object to the ColumnCollection collection.

public:
 void Add(Microsoft::SqlServer::Management::Smo::Column ^ column);
public void Add (Microsoft.SqlServer.Management.Smo.Column column);
Parameters
column
Column Column

A Column object value that specifies the column to be added to the ColumnCollection collection.

Examples

Using Collections

Add(Column, Int32) Add(Column, Int32)

Adds a Column object to the ColumnCollection collection at a specified position.

public:
 void Add(Microsoft::SqlServer::Management::Smo::Column ^ column, int insertAtPosition);
public void Add (Microsoft.SqlServer.Management.Smo.Column column, int insertAtPosition);
Parameters
column
Column Column

A Column object value that specifies the column to be added to the ColumnCollection collection.

insertAtPosition
Int32 Int32

An Int32 value that specifies the index position in the collection at which to insert the Column object.

Examples

Using Collections

Add(Column, String) Add(Column, String)

Adds a Column object to the ColumnCollection collection after a specified Column object currently in the ColumnCollection collection.

public:
 void Add(Microsoft::SqlServer::Management::Smo::Column ^ column, System::String ^ insertAtColumnName);
public void Add (Microsoft.SqlServer.Management.Smo.Column column, string insertAtColumnName);
Parameters
column
Column Column

A Column object that already exists in the collection after which the new Column object is inserted.

insertAtColumnName
String String

A string value that specifies the name of the Column object, currently in the collection, after which to insert the new Column.

Examples

Using Collections

Applies to