Skip to main content

Timeline for Can someone improve this C# code

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Oct 16, 2012 at 22:49 comment added dreza Fair enough. I definitely agree that copying code tends to not lead to actual learning and potentially makes life more difficult int he long .
Oct 16, 2012 at 20:14 comment added Trevor Pilley @dreza that's a fair comment, I wouldn't actually write it this way myself either however I've noticed that sometimes people answer with a better implementation but without explaining why it's an improvement. My intention was to point out what the issues with the original code were rather than to re-write the method so that the OP could actually learn what the problems were rather than just blindly copying a smaller implementation.
Oct 16, 2012 at 20:00 comment added dreza A personal preference but I would probably reverse your if statement to remove the need for the !. Just for me makes it easier to read although (i.e. don't need to think about the not) but I know there are some arguments for this way.
Oct 16, 2012 at 10:21 history answered Trevor Pilley CC BY-SA 3.0