How to check if a collection is empty with LINQ?
How to check if a collection is empty with LINQ?
bool hasEmployees = employees.Any();
Console.WriteLine(hasEmployees ? "There are employees" : "No
employees");
How to check if a collection is empty with LINQ?
bool hasEmployees = employees.Any();
Console.WriteLine(hasEmployees ? "There are employees" : "No
employees");