using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
public class Hat
{
public Color Color { get; set; }
public bool IsGreen() => Color == Color.Green;
}
public class Program
public static void Main()
List<Hat> hats = [];
Console.WriteLine($"All hats are green: {hats.All(h => h.IsGreen())}");