Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C# interview question. Closure pitfalls.
//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 // what will be output of this? // how can the code be improved? using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var funcs = new List<Action>(); for(int i = 0; i < 5; i++) { funcs.Add(() => Console.WriteLine(i)); } foreach(var func in funcs) { func(); } } } }
run
|
edit
|
history
|
help
0
масиви форіч
to find all substring
loop exmple
bytes to string to bytes.
asxasxscdf
Find Max Number Of Occurences in an int array
Problem: on_off
Konakubo Wall
Funzpoint
WhereEnumerator