using System;
using System.Collections.Generic;
using System.Linq;
public class Programx
{
public class testClass
public int num;
}
public static void Main()
// List<testClass> tests = new List<testClass>();
List<testClass> tests = null;
testClass t = new testClass();
t.num = 0;
// tests?.Add(t);
tests
?.Where(test => test.num == 1)
.Select(test => new testClass())
.ToList();
Console.WriteLine($"test: {tests?.Count ?? 0}");