IEnumerable<string> colors = new List<string> { "Red", "Green", "Blue" };
foreach (string color in colors)
{
Console.WriteLine(color);
}
IQueryable<Employee> query = dbContext.Employees.Where(e => e.Department == "HR");
List<Employee> hrEmployees = query.ToList();
ICollection<string> colors = new List<string> { "Red", "Green", "Blue" };
int count = colors.Count;
bool containsGreen = colors.Contains("Green");
colors.Add("Yellow");
colors.Remove("Red");
IList<string> fruits = new List<string> { "Apple", "Banana", "Cherry" };
int cherryIndex = fruits.IndexOf("Cherry");
fruits.Insert(1, "Orange");
fruits.RemoveAt(0);
List<int> numbers = new List<int> { 1, 2, 3, 4, 5 };
numbers.Add(6);
numbers.Remove(2);
int thirdNumber = numbers[2];