using System.Collections.Generic;
public static List<Human> humans = new List<Human>()
clothings=new List<Clothing>()
clothings=new List<Clothing>()
Garment = "RandomGarment",
public static List<CurrentClothes> currentclothes = new List<CurrentClothes>()
static void Main(string[] args)
var currentclothesAsHashSet = currentclothes.ToHashSet();
var human = humans.Where(x => !currentclothesAsHashSet.Except(x.clothings.OfType<CurrentClothes>().ToHashSet()).Any());
foreach (var human1 in human)
Console.WriteLine(human1.FirstName);
public string FirstName { get; set; }
public string LastName { get; set; }
public List<Clothing> clothings { get; set; }
public class Clothing : CurrentClothes
public string ClothingID { get; set; }
public class CurrentClothes : IEquatable<CurrentClothes>
public string Garment { get; set; }
public string Color { get; set; }
public override bool Equals(object obj) => ReferenceEquals(this, obj) || obj is CurrentClothes other && Equals(other);
public bool Equals(CurrentClothes other)
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Garment == other.Garment && Color == other.Color;
public override int GetHashCode() => HashCode.Combine(Garment, Color);