using System.Collections.Generic;
static IList<int> SelectedCps { get; set;}
static bool is1or2() => SelectedCps.Count is 1 or 2;
static bool isInInterval1_2() => SelectedCps.Count is >=1 and <=2;
public static void Main()
var list = new List<int>();
for(int i = 0; i < 100; i++){
System.Console.WriteLine("Test succeeeded");
public static void test(List<int> l)
if(isInInterval1_2() != is1or2())
throw new Exception($"count = {SelectedCps.Count}");