asp.net.ph

DataColumn.Ordinal Property

System.Data Namespace   DataColumn Class


Returns the position of the column in the DataColumnCollection.

Syntax


Script DataColumn.Ordinal = intIndexar

Property Value


intIndexar The position of the column. Gets -1 if the column is not a member of a collection.

The property is read only with no default value.

Example

The following example returns the column name, ordinal, and data type of a column.

private void PrintColumnDetails ( DataColumn myColumn ) {
   // print the Ordinal, ColumnName, and DataType of the column.
   Response.Write ( myColumn.Ordinal );
   Response.Write ( myColumn.ColumnName );
   Response.Write ( myColumn.DataType );
}
  C# VB

See Also

DataColumn Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph