How would I skip an item in a foreach loop without breaking out of the loop
altogether?
foreach(SearchResult resCol1 in resCol)
{
string myString = resCol1.Properties["name"][0].ToString();
if (myString.IndexOf("badstuff") > 0)
//go to next item
…
}
Peter Rilling - 22 Sep 2005 22:29 GMT
if( ... ){
continue;
}
> How would I skip an item in a foreach loop without breaking out of the
> loop
[quoted text clipped - 7 lines]
> .
> }
James - 22 Sep 2005 22:54 GMT
Okay, that must have been the only one I did not try... Thanks!
> if( ... ){
> continue;
[quoted text clipped - 11 lines]
> > .
> > }