Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return to the top of a foreach loop
Message
De
15/01/2007 12:10:52
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01185290
Message ID:
01185646
Vues:
10
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform