[Solved] How can I use lambdas with methods in C#?
[ad_1] you can use an expression bodied method. static double Stirling(long n) => Math.Sqrt((2 * n + 1.0 / 3.0) * Math.PI) * Math.Pow(n, n) / Math.Exp(n); This is only possible when the method executes a single statement, and in this case, we get rid of the return statement. or you can use a Func … Read more