Поиск по List

Есть List <StudSkills>

    public class StudSkills
{
    public string Student { get; set; }
    public bool Math { get; set; }
    public bool Phisycs { get; set; }
}

Как получить количество строк, в которых Math = true?


Ответы (1 шт):

Автор решения: Aziz Umarov

Думаю можно так

list.Count(item => item.Math)
→ Ссылка