Created
December 14, 2017 13:19
-
-
Save rkhozinov/aa7891426fdd77c3987995c93e9e31c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void RemoveStudent(string name, string lastname) | |
{ | |
string _name = Student.FirstCapital(name); | |
string _lastname = Student.FirstCapital(lastname); | |
int index = 0; | |
foreach (Student student in Items) | |
{ | |
if (student.Name == _name && student.Lastname == _lastname) | |
{ | |
index = Items.IndexOf(student); | |
} | |
} | |
RemoveAt(index); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment