private bool IsAlreadyPresent(string subject, SubjectType type, SubjectInfo[] allSubjects) { foreach(SubjectInfo current in allSubjects) { if(current.Type == type && current.Name == subject) { return true; } } return false; }