TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sam
NA
166
0
Foreach loop - Skip an item and go to next one
Jun 5 2014 2:40 AM
Hi,
I have a foreach loop that iterates through a list of files by their name, and then, in another class, still within the loop, opens each file and manipulates it in various ways.
When encountering a bad file (which I can easily detect), I wish to skip the file data manipulation, ignore that file and go to the next item (file name) in the foreach loop.
In short: How can one skip an item in foreach loop and continue with the next one?
Thanks
samatl
Reply
Answers (
3
)
Sealed Class
Regular Expression please..