c# - how to check if property value of each list member is same -


so have class student 1 property, int age. if have list<student> students, how check if age of students in list equal?

you can check using all method, presumably list have students:

var firststudent = students.first(); students.all(s => s.age == firststudent.age); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -