using System.Collections.Generic;
public int ID; public string FirstName; public string LastName;
public static void Main()
var results=new List<myClass> {
new myClass() { ID=1, FirstName="Bill", LastName="Smith" },
new myClass() { ID=2, FirstName="John", LastName="Wilson" },
new myClass() { ID=3, FirstName="Doug", LastName="Berg" },
new myClass() { ID=4, FirstName="Bill", LastName="Wilson" },
new myClass() { ID=5, FirstName="Liv", LastName="Dunham" },
var removeList = new List<int>() { 2, 3 };
Console.WriteLine("\nBefore:");
foreach(var x in results) {
Console.WriteLine(x.FirstName + " " + x.LastName);
results.RemoveAll(r => removeList.Any(a => a==r.ID));
results.RemoveAll(r => r.ID==4);
void myRemove() => results.RemoveAll(r => results[^1].FirstName == r.FirstName);
Console.WriteLine("\nAfter:");
foreach(var x in results) {
Console.WriteLine(x.FirstName + " " + x.LastName);