using System; public class Test { static void Main(string[] args) { Foo(5, () => gt); Console.ReadKey(); } private static int gt { get { Console.WriteLine("чтение переменной"); return 100; } } static void Foo(int z, Func getData) { Console.WriteLine("метод"); if (z >= 10) { Console.WriteLine("переменная больше 10"); } else { Console.WriteLine("переменная = " + getData()); } } }