Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return to the top of a foreach loop
Message
De
12/01/2007 18:23:26
 
 
À
12/01/2007 18:20:08
John Baird
Coatesville, Pennsylvanie, États-Unis
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:
01185296
Vues:
21
>Doesn't break jump out of the foreach loop whereas continue will loop again?

Yep, thanks John ... my bad ... I didn't read the question closely enough. =0(

~~Bonnie




>
>
>>I think maybe "break" is what you want to use.
>>
>>~~Bonnie
>>
>>
>>>I need to loop through an entitylist and, based on the record values, look some information up from other tables and write out lines to a text file. I have a test to make sure that there are corresponding records in the related files. If not, I don't want to write out any lines for that record and need to return to the top of the foreach loop. I can't find a jump statement to handle that. I tried goto ForEach, but that didn't work. Do I need to call a separate method from inside the foreach loop and use return or is there something similar to the "loop" command in FoxPro?
>>>
>>>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