Mid LINQ

Check if department exists in list?

Check if department exists in list

bool exists = departments.Any(d => d.Name == "Marketing");

More from LINQ Tutorial

All questions for this course