Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lambdas and closures in C#
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Action<int> lambda = (x) => { lambda = (y) => { lambda = (z) => { Console.WriteLine(x + y + z); }; Console.WriteLine(x + y); }; Console.WriteLine(x); }; lambda(2); lambda(3); lambda(4); } } }
run
|
edit
|
history
|
help
0
asdfrgthyu6543wdsc
ElevatorDesign_2020Dec11
Main 4-3
AX 2012 Test #1
asxsdf
Prime Number
Sample
Raiz Cuadrada
Code challenge: Integer Comparison - Overkill - Function Dictionary
Nullable type - Value Exception - Solution