School.Course.CheckIfStudentExists C# (CSharp) Method

CheckIfStudentExists() public method

public CheckIfStudentExists ( Student student ) : bool
student Student
return bool
        public bool CheckIfStudentExists(Student student)
        {
            bool studentFound = false;

            for (int i = 0; i < this.Students.Count; i++)
            {
                if (this.Students[i].UniqeNumber == student.UniqeNumber)
                {
                    studentFound = true;
                    break;
                }
            }

            return studentFound;
        }