I was wondering if anyone Knows how I can avoid re-running the If Statement in the following code
int x = 1; load_page(standurl, 0); firstentryOnload = UrlList[0]; for (int i = 1; i <= lastPage; i++) { if (UrlList.Count > setting_EPP) table_populate(0); System.Threading.Thread.Sleep(delay); load_page(standurl, i); if (x > 10) { //refresh firstpage,check for new data System.Threading.Thread.Sleep(delay); x = 1; } x++; }
I want to run table_populate(0); when the UrlList.Count > setting_EPP
Without the "If/Then" checking Every Loop.
Essentially I want it to run that If Statement once and then stop existing.
I know how to stop the if/then statement from running, But I don't want it to keep checking after it runs
Aucun commentaire:
Enregistrer un commentaire