Help with program
I have attached a zip to the post and I need help trying to finish this. The problems I am having are when I click the nextStudentButton and laststudentbutton it goes until the end of the array. I would like to get it to stop at the last name that is stored in the arraylist. Then i also am having trouble when i am adding a student to the arrayList I want to be able to compare the idnumber of the student already in the list to the id number of the new student I am adding and if the any two id numbers are the same then the student cannot be added. Any help would be appreciated. Thanks
FroglegPosted Feb 3, 2012, 8:54 PM
FroglegPosted Feb 3, 2012, 4:39 PM
Soon as I get somewhere, I'll post result
KevinPosted Feb 3, 2012, 2:55 PM
FroglegPosted Feb 3, 2012, 2:10 PM
As to check id try this
public void checkId()
{
foreach (Student stu in students)
{
if (stu.IdNumber.ToString() == idAddTextBox.Text)
{
MessageBox.Show("Sorry.Student id already in use");
return;
}
}
}