Pk, so here's the code I'm running for a checkboxlist object
public void regSubjects(object sender, EventArgs e)
{
int courseCount = 0;
for (int i = 0; i < coursesFound.Items.Count; i++)
{
if (coursesFound.Item[i].Selected)
coursesCount++;
}
if ((courses < 4) && (courses > 6))
clabel.Text = string.Format("Choose between 4 - 6 subjects");
}
Wierd thing is, if have only one condition in my final if, it works fine, if i have both, it doesn't pick it up, even if I nest the two conditions in their own if, it doesn't pick up on the error, just ignores it. Viusal Studio 2010, on Windows 7. The same code will run fine on a friends laptop.