Click here to Skip to main content
15,892,674 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.

 
GeneralRe: Ccc - you win! Pin
kalberts10-Dec-19 6:27
kalberts10-Dec-19 6:27 
GeneralRe: Ccc - you win! Pin
Sander Rossel11-Dec-19 2:03
professionalSander Rossel11-Dec-19 2:03 
GeneralRe: Ccc - you win! Pin
musefan9-Dec-19 2:55
musefan9-Dec-19 2:55 
GeneralI never knew I'd miss an operator I hate so much Pin
honey the codewitch8-Dec-19 19:57
mvahoney the codewitch8-Dec-19 19:57 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
OriginalGriff8-Dec-19 20:33
mveOriginalGriff8-Dec-19 20:33 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
Super Lloyd8-Dec-19 23:30
Super Lloyd8-Dec-19 23:30 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
honey the codewitch8-Dec-19 23:32
mvahoney the codewitch8-Dec-19 23:32 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
OriginalGriff8-Dec-19 23:56
mveOriginalGriff8-Dec-19 23:56 
I'll admit, I don't like that - but I see what you are doing.
It kinda depends on what Count is: if it's a field-backed property then I'd probably just use the property directly:
for(i = 0; i < list.Count; i++)
because it's a load more readable, and thus more maintainable.
If it isn't, then I'd probably split it and to heck with the scope:
int itemsCount=list.Count;
for(i = 0; i < itemsCount; i++)
Or just use a foreach instead.

For me, readability is foremost: code that makes the reader reader stop and have to backtrack to work out what he just read is intrinsically "bad" - it makes for less maintainable (and thus reliable long term) code in my opinion. Performance is important, yes - but readability is way more so!

But I don't do code reviews on your stuff, so you can roll your way all you want! Laugh | :laugh:

And thanks for dumping the var from the loop! Thumbs Up | :thumbsup:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

GeneralRe: I never knew I'd miss an operator I hate so much Pin
harold aptroot9-Dec-19 0:42
harold aptroot9-Dec-19 0:42 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
honey the codewitch9-Dec-19 2:51
mvahoney the codewitch9-Dec-19 2:51 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
PIEBALDconsult9-Dec-19 8:26
mvePIEBALDconsult9-Dec-19 8:26 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
OriginalGriff9-Dec-19 9:16
mveOriginalGriff9-Dec-19 9:16 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
PIEBALDconsult9-Dec-19 9:49
mvePIEBALDconsult9-Dec-19 9:49 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
OriginalGriff9-Dec-19 21:14
mveOriginalGriff9-Dec-19 21:14 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
PIEBALDconsult10-Dec-19 3:11
mvePIEBALDconsult10-Dec-19 3:11 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
Super Lloyd8-Dec-19 23:29
Super Lloyd8-Dec-19 23:29 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
honey the codewitch8-Dec-19 23:30
mvahoney the codewitch8-Dec-19 23:30 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
Greg Utas9-Dec-19 1:11
professionalGreg Utas9-Dec-19 1:11 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
honey the codewitch9-Dec-19 2:54
mvahoney the codewitch9-Dec-19 2:54 
GeneralRe: I never knew I'd miss an operator I hate so much Pin
PIEBALDconsult9-Dec-19 8:10
mvePIEBALDconsult9-Dec-19 8:10 
GeneralYAY! Slang parsed 8000+ lines of C# code. Pin
honey the codewitch8-Dec-19 16:29
mvahoney the codewitch8-Dec-19 16:29 
GeneralRe: YAY! Slang parsed 8000+ lines of C# code. Pin
Chris Maunder8-Dec-19 16:35
cofounderChris Maunder8-Dec-19 16:35 
GeneralRe: YAY! Slang parsed 8000+ lines of C# code. Pin
honey the codewitch8-Dec-19 17:08
mvahoney the codewitch8-Dec-19 17:08 
GeneralRe: YAY! Slang parsed 8000+ lines of C# code. Pin
PIEBALDconsult8-Dec-19 17:06
mvePIEBALDconsult8-Dec-19 17:06 
GeneralRe: YAY! Slang parsed 8000+ lines of C# code. Pin
honey the codewitch8-Dec-19 17:07
mvahoney the codewitch8-Dec-19 17:07 

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.