J
John A Grandy
Is it possible to write a foreach so that it simultaneously iterates through
two collections ( or two properties of the same collection ) ?
Following is *only meant as an example* :
-- iterate a dictionary obtaining the next key and value on each iteration.
The following doesn't work
foreach ( string key in MyDictionary.Keys , object value in
MyDictionary.Values )
{
.... but perhaps there's some other way ...
two collections ( or two properties of the same collection ) ?
Following is *only meant as an example* :
-- iterate a dictionary obtaining the next key and value on each iteration.
The following doesn't work
foreach ( string key in MyDictionary.Keys , object value in
MyDictionary.Values )
{
.... but perhaps there's some other way ...