foreach in managed c++

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am working on interop using C and managed c++ (on Visual Studio 2003 IDE).
How do i simulate the foreach loop present in C# or VB.NET in MC++

foreach (DataRow dr in ds.Tables[0].Rows) equivalent in MC++?

Thanks
 
IEnumerator* en = ds.Tables[0].Rows->GetEnumerator();

while(en->MoveNext())
{
DataRow* dr = dynamic_cast<DataRow*>(en->Current);
//...
}
 
Back
Top