Click here to Skip to main content
15,893,663 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralWSO CCC OTD 2019-05-21 Pin
OriginalGriff20-May-19 21:52
mveOriginalGriff20-May-19 21:52 
GeneralRe: WSO CCC OTD 2019-05-21 Pin
musefan20-May-19 21:54
musefan20-May-19 21:54 
GeneralRe: WSO CCC OTD 2019-05-21 - we have a winner! Pin
OriginalGriff20-May-19 21:58
mveOriginalGriff20-May-19 21:58 
GeneralRe: WSO CCC OTD 2019-05-21 - we have a winner! Pin
musefan20-May-19 22:01
musefan20-May-19 22:01 
GeneralRe: WSO CCC OTD 2019-05-21 - we have a winner! Pin
super20-May-19 22:08
professionalsuper20-May-19 22:08 
GeneralRe: WSO CCC OTD 2019-05-21 - we have a winner! Pin
OriginalGriff20-May-19 22:10
mveOriginalGriff20-May-19 22:10 
GeneralRe: WSO CCC OTD 2019-05-21 - we have a winner! Pin
PeejayAdams20-May-19 22:12
PeejayAdams20-May-19 22:12 
GeneralRe: WSO CCC OTD 2019-05-21 - we have a winner! Pin
OriginalGriff20-May-19 22:53
mveOriginalGriff20-May-19 22:53 
PeejayAdams wrote:
Aren't we meant to use lambdas these days?

You mean .ForEach? Laugh | :laugh:
C#
List<string> items = new List<string>() { "one", "two", "three" };
items.ForEach(i => Console.WriteLine(i));
I still think the old way is more readable:
C#
List<string> items = new List<string>() { "one", "two", "three" };
foreach (string i in items)
    {
    Console.WriteLine(i);
    }
.ForEach used to be faster (List.ForEach vs foreach(…) | Jon Skeet's coding blog[^]) But collection modification detection was added at .NET 4.5 so that may not be the case anymore.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralThis was real life to me Pin
W Balboos, GHB20-May-19 10:42
W Balboos, GHB20-May-19 10:42 
GeneralRe: This was real life to me Pin
Vaclav_20-May-19 12:11
Vaclav_20-May-19 12:11 
GeneralRe: This was real life to me Pin
Gary Wheeler21-May-19 7:07
Gary Wheeler21-May-19 7:07 
GeneralThought of the Day Pin
OriginalGriff20-May-19 4:58
mveOriginalGriff20-May-19 4:58 
QuestionRe: Thought of the Day Pin
megaadam20-May-19 5:08
professionalmegaadam20-May-19 5:08 
GeneralRe: Thought of the Day Pin
Mike Hankey20-May-19 5:08
mveMike Hankey20-May-19 5:08 
JokeRe: Thought of the Day Pin
Alberto Escobar Jiménez20-May-19 5:28
Alberto Escobar Jiménez20-May-19 5:28 
GeneralRe: Thought of the Day Pin
Fueled By Decaff20-May-19 21:44
Fueled By Decaff20-May-19 21:44 
GeneralRe: Thought of the Day Pin
W Balboos, GHB20-May-19 5:50
W Balboos, GHB20-May-19 5:50 
GeneralRe: Thought of the Day Pin
jeron120-May-19 6:32
jeron120-May-19 6:32 
GeneralRe: Thought of the Day Pin
DRHuff20-May-19 6:35
DRHuff20-May-19 6:35 
GeneralRe: Thought of the Day Pin
lopatir20-May-19 7:31
lopatir20-May-19 7:31 
GeneralRe: Thought of the Day Pin
Gary Wheeler20-May-19 7:15
Gary Wheeler20-May-19 7:15 
QuestionRe: Thought of the Day Pin
Eddy Vluggen20-May-19 8:46
professionalEddy Vluggen20-May-19 8:46 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer20-May-19 10:24
professionalDaniel Pfeffer20-May-19 10:24 
GeneralRe: Thought of the Day Pin
den2k8820-May-19 21:18
professionalden2k8820-May-19 21:18 
GeneralRe: Thought of the Day Pin
OriginalGriff20-May-19 21:39
mveOriginalGriff20-May-19 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.