Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια

Everyday's Software Design

Scribbles on Software Engineering

Παρουσίαση με Ετικέτες

Όλες οι Ετικέτε... » LINQ » C#   (RSS)
LINQ Quiz...
Can you guess the output of the following code?
var values = new List<int>() { 100, 110, 120 };
var funcs = new List<Func<int>>();
foreach (var v in values)
funcs.Add(() => v);
foreach (var f in funcs)

Console.WriteLine(f());
If it's not "solved" I will post the answer in the next post...