Created
March 31, 2021 13:21
-
-
Save sasan-salem/79d1de0ae999b39f8e2fb8567d57d1fe 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
List<Student> students = new List<Student>(); | |
// Add some students to this List | |
var specificStudent = new Student() { SerialNo = 12, Number = 34, Grade = 3, Name = "Joe" }; | |
bool exist1 = students.Contains(specificStudent, new NumberEqualityComparer()); | |
bool exist2 = students.Contains(specificStudent, new SerialNoEqualityComparer()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment