1 Replies - 220 Views - Last Post: 25 July 2012 - 10:12 PM Rate Topic: -----

#1 kytro360  Icon User is offline

  • D.I.C Head

Reputation: -15
  • View blog
  • Posts: 58
  • Joined: 28-July 11

How to iterate down in a foreach loop?

Posted 25 July 2012 - 08:17 PM

This might be a weird question but how do you iterate down in foreach loop?

For example I am doing a foreach loop where for each item it goes through in a listBox, it will visit the site in a HTTPWebRequest.

I want to set up an if statement so that if it doesn't contain the text, for example "Hello", I can tell the foreach loop to move on.

Is this possible?
Is This A Good Question/Topic? 0
  • +

Replies To: How to iterate down in a foreach loop?

#2 Atli  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3041
  • View blog
  • Posts: 4,556
  • Joined: 08-June 10

Re: How to iterate down in a foreach loop?

Posted 25 July 2012 - 10:12 PM

You're looking for the continue keyword.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1