using System.Collections.Generic;
public string Name { get; set; }
public string Role { get; set; }
public string Location { get; set; }
public int YearsOfExperience { get; set; }
public Employee(string name, string role, string location, int yearsOfExperience)
YearsOfExperience = yearsOfExperience;
public static void Main(string[] args)
List<Employee> employeeList= new List<Employee>();
employeeList.Add(new Employee("Miguel", ".NET Developer", "LATAM", 7));
employeeList.Add(new Employee("Alberto", "Software Developer", "USA", 6));
employeeList.Add(new Employee("Mario", "Web Developer", "LATAM", 8));
employeeList.Add(new Employee("Ana", "C# Developer", "Europe", 3));
employeeList.Add(new Employee("Isabel", "Python Developer", "LATAM", 5));
employeeList.Add(new Employee("Juan", "C++ Developer", "USA", 9));
employeeList.Add(new Employee("James", "Raect Developer", "LATAM", 4));
employeeList.Add(new Employee("Rick", "Backend Developer", "USA", 5));
employeeList.Add(new Employee("Jhon", "Software Engineer", "Europe", 5));
employeeList.Add(new Employee("Mary", "Fullstack Developer", "USA", 7));
Console.WriteLine("Please enter a location: ");
string locationInput = Console.ReadLine();
Console.WriteLine("Please enter a minimum years of experience: ");
int yearsOfExperienceInput = Convert.ToInt32(Console.ReadLine());
var matchingEmployees = employeeList.Where( emp => emp.Location == locationInput && emp.YearsOfExperience >= yearsOfExperienceInput).ToList();
if (matchingEmployees.Any())
Console.WriteLine("\nMatching Employees:\n");
matchingEmployees.ForEach( employee => {
Console.WriteLine($"Name: {employee.Name},\nRole: {employee.Role},\nLocation: {employee.Location},\nYears of Experience: {employee.YearsOfExperience}\n");
Console.WriteLine("Not found employees for entered values, please try again");