Y
Yogi_Bear_79
I have a for each loop, that currently runs through an array of 11,000+
items. I exerpted the code part below that I have a question on. I thought
this code would update the form label and increment it by one each time the
code passed to the next element in the array. Maybe it just goes to fast,
but it goes from zero (default) to thte final number in what appears to be
one motion.
private void AddRestrictedSites()
{
foreach(string x in strResSitesList)
{
MainForm frm = (MainForm)MainForm.ActiveForm;
frm.LabelRestrictSites = ((iTotal += 1).ToString());
}
}
items. I exerpted the code part below that I have a question on. I thought
this code would update the form label and increment it by one each time the
code passed to the next element in the array. Maybe it just goes to fast,
but it goes from zero (default) to thte final number in what appears to be
one motion.
private void AddRestrictedSites()
{
foreach(string x in strResSitesList)
{
MainForm frm = (MainForm)MainForm.ActiveForm;
frm.LabelRestrictSites = ((iTotal += 1).ToString());
}
}