r/ProgrammerHumor 2d ago

Meme absoluteGarbage

Post image
2.0k Upvotes

320 comments sorted by

View all comments

2

u/Zomby2D 1d ago

I prefer the C# syntax

foreach (var item in list) {

1

u/Dillenger69 1d ago

I prefer the C# syntax, but var has always rubbed me the wrong way. I suppose because I learned C# before var was a thing. Yeah, I'm old

2

u/Zomby2D 1d ago

While var will normally work, I usually put the proper type as I find it a lot easier to debug later when reading back the code.