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

Everyday's Software Design

Scribbles on Software Engineering
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...
Share
Posted: Σάββατο, 22 Ιανουαρίου 2011 12:04 μμ από το μέλος gnikolaropoulos
Δημοσίευση στην κατηγορία: , , ,

Σχόλια:

Χωρίς Σχόλια

Έχει απενεργοποιηθεί η προσθήκη σχολίων από ανώνυμα μέλη