IndexedColumnCollection.Add IndexedColumnCollection.Add Method

Definition

Adds an IndexedColumn object to the IndexedColumnCollection column collection.

Overloads

Add(IndexedColumn) Add(IndexedColumn)

Adds an IndexedColumn object to the IndexedColumnCollection object.

Add(IndexedColumn, Int32) Add(IndexedColumn, Int32)

Adds an IndexedColumn object at a specified index position in the IndexedColumnCollection collection.

Add(IndexedColumn, String) Add(IndexedColumn, String)

Adds an IndexedColumn object to the position after a specified, existing IndexedColumn object in the IndexedColumnCollection collection.

Add(IndexedColumn) Add(IndexedColumn)

Adds an IndexedColumn object to the IndexedColumnCollection object.

public:
 void Add(Microsoft::SqlServer::Management::Smo::IndexedColumn ^ indexedColumn);
public void Add (Microsoft.SqlServer.Management.Smo.IndexedColumn indexedColumn);
Parameters
indexedColumn
IndexedColumn IndexedColumn

An IndexedColumn object value that is to be added into the IndexedColumnCollection column collection.

Examples

Using Collections

Add(IndexedColumn, Int32) Add(IndexedColumn, Int32)

Adds an IndexedColumn object at a specified index position in the IndexedColumnCollection collection.

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

An IndexedColumn object value that is to be added into the IndexedColumnCollection column collection.

insertAtPosition
Int32 Int32

An Int32 value that specifies the index position of the IndexedColumnCollection collection.

Examples

Using Collections

Add(IndexedColumn, String) Add(IndexedColumn, String)

Adds an IndexedColumn object to the position after a specified, existing IndexedColumn object in the IndexedColumnCollection collection.

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

An IndexedColumn object value that is to be added into the IndexedColumnCollection collection.

insertAtColumnName
String String

A String value that specifies the name of the existing IndexedColumn object in the collection after which to insert the new IndexedColumn object.

Examples

Using Collections

Applies to