using System; using System.Linq; public class Test { static int getStuff(){ System.Console.WriteLine("called"); return 2; } public static void Main() { if ((let thing = getStuff() from option in new int[] {1, 2, 3} where option == thing select option).Any()) System.Console.WriteLine("option"); } }