Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return to the top of a foreach loop
Message
From
15/01/2007 12:10:52
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01185290
Message ID:
01185646
Views:
9
Yes, Linda, as Alexandre noted, this has been answered already ... I didn't read your question correctly and responded with "break" when it should have been "continue".

Sorry for the misunderstanding.

~~Bonnie



>Bonnie,
>
>I tried using break and it exited the loop entirely. I want to keep looping through the rest of the records and just skip the one with the error. The only thing I can think of is to move all the code inside the loop to another method and use return to go back to the loop.
>
>Do you have a better idea? Thanks.
>
>Linda
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform