DataColEnumerator Class  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class is used when the ADO enumerator returns a Dataset or Recordset. This enumerator allows you to enumerate over the columns. This class cannot be inherited.
public ref class DataColEnumerator sealed : System::Collections::IEnumeratorpublic sealed class DataColEnumerator : System.Collections.IEnumeratortype DataColEnumerator = class
    interface IEnumeratorPublic NotInheritable Class DataColEnumerator
Implements IEnumerator- Inheritance
- 
				DataColEnumerator
- Implements
Remarks
The members of this class cannot be used directly. This class is used by the foreach keyword (For Each in Visual Basic). The following code example is a piece of a foreach loop showing simply how to use indexing to place a data column into the enumerator and iterate over it.
Vardisp.LockOneForWrite("VariableThatHadIndexSetToMinus1", vars)  
DataColEnumerator dcEnum = (DataColEnumerator)vars[0]  
foreach (object o in dcEnum)  
{  
    // Do something with o,   
    // where o is the value of the column, just as you would get  
    // if you had a variable for a specific index.  
}  
You must set the index for the variable mapping to -1 to retrieve the entire collection into the variable, instead of retrieving just a column which is based on an index, so then you can access it directly.
Properties
| Current | This API supports the product infrastructure and is not intended to be used directly from your code. Gets the current object in the collection. | 
Methods
| MoveNext() | This API supports the product infrastructure and is not intended to be used directly from your code. Indicates whether the enumerator moves to the next element. | 
| Reset() | This API supports the product infrastructure and is not intended to be used directly from your code. Resets the DataColEnumerator to its default configuration |