NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ColumnsCollection.Item

[To be supplied.]

[C#] In C#, this member is the indexer for the ColumnsCollection class.

Overload List

Gets the column from the collection at the specified index.

[Visual Basic] Overloads Overridable Public Default ReadOnly Property Item(Integer) As DataColumn
[C#] public DataColumn this[int] {virtual get;}
[C++] public: __property virtual DataColumn* get_Item(int);
[JScript] ColumnsCollection.Item (int)

Gets the column from the collection with the specified name.

[Visual Basic] Overloads Overridable Public Default ReadOnly Property Item(String) As DataColumn
[C#] public DataColumn this[String] {virtual get;}
[C++] public: __property virtual DataColumn* get_Item(String*);
[JScript] ColumnsCollection.Item (String)

Example [Visual Basic]

The following example uses the Item property (ColumnsCollection indexer) to print the DataType value of a DataColumn object specified by index.

Note   This example shows how to use one of the overloaded versions of the Item property (ColumnsCollection indexer). For other examples that may be available, see the individual overload topics.

[Visual Basic]

Dim cols As DataColumns
' Get the ColumnsCollection from a DataTable in a DataSet.
cols = DataSet1.Tables("Orders").Columns
' Print the DataType of the column named "id."
Console.WriteLine(cols("id").DataType.ToString)

See Also

ColumnsCollection Class | ColumnsCollection Members | System.Data Namespace