public static int WithRecursion(int nr) { Func<int, int> fib = null; fib = n => n > 1 ? fib(n - 1) + fib(n - 2) : n; return fib(nr); }