Click here to Skip to main content
15,920,896 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: Pet Peeve Pin
Brady Kelly10-Dec-14 18:21
Brady Kelly10-Dec-14 18:21 
GeneralRe: Pet Peeve Pin
Paulo Zemek10-Dec-14 19:32
Paulo Zemek10-Dec-14 19:32 
GeneralRe: Pet Peeve Pin
Brady Kelly10-Dec-14 21:38
Brady Kelly10-Dec-14 21:38 
GeneralRe: Pet Peeve Pin
RJ Hatch11-Dec-14 6:05
RJ Hatch11-Dec-14 6:05 
GeneralRe: Pet Peeve Pin
Paulo Zemek11-Dec-14 7:29
Paulo Zemek11-Dec-14 7:29 
GeneralRe: Pet Peeve Pin
Daniel Vaughan11-Dec-14 0:24
Daniel Vaughan11-Dec-14 0:24 
GeneralRe: Pet Peeve Pin
Brady Kelly11-Dec-14 0:47
Brady Kelly11-Dec-14 0:47 
GeneralRe: Pet Peeve Pin
StatementTerminator11-Dec-14 8:18
StatementTerminator11-Dec-14 8:18 
Brady Kelly wrote:
I prefer
if (something) DoAB();
for the latter. I never use it, but have recently come across it. It seems more readable to me.


Me too, if you must omit the braces then it's best to put it on one line. That way you don't have to worry about someone coming along later, not paying attention, and doing this:

C#
if (something)
  DoA();
  DoB();

GeneralRe: Pet Peeve Pin
Oleg A.Lukin10-Dec-14 23:06
Oleg A.Lukin10-Dec-14 23:06 
GeneralRe: Pet Peeve Pin
Paulo Zemek11-Dec-14 6:45
Paulo Zemek11-Dec-14 6:45 
GeneralRe: Pet Peeve Pin
Oleg A.Lukin11-Dec-14 21:15
Oleg A.Lukin11-Dec-14 21:15 
GeneralRe: Pet Peeve Pin
tom144311-Dec-14 3:32
tom144311-Dec-14 3:32 
GeneralRe: Pet Peeve Pin
StatementTerminator11-Dec-14 8:30
StatementTerminator11-Dec-14 8:30 
GeneralRe: Pet Peeve Pin
Paulo Zemek11-Dec-14 8:37
Paulo Zemek11-Dec-14 8:37 
GeneralRe: Pet Peeve Pin
Sander Rossel10-Dec-14 10:21
professionalSander Rossel10-Dec-14 10:21 
GeneralRe: Pet Peeve PinPopular
Ian Shlasko10-Dec-14 11:16
Ian Shlasko10-Dec-14 11:16 
JokeRe: Pet Peeve Pin
Jeremy Falcon10-Dec-14 11:23
professionalJeremy Falcon10-Dec-14 11:23 
GeneralRe: Pet Peeve Pin
Sander Rossel10-Dec-14 11:29
professionalSander Rossel10-Dec-14 11:29 
GeneralRe: Pet Peeve Pin
glennPattonWork310-Dec-14 11:50
professionalglennPattonWork310-Dec-14 11:50 
GeneralRe: Pet Peeve Pin
_Damian S_10-Dec-14 11:55
professional_Damian S_10-Dec-14 11:55 
GeneralRe: Pet Peeve Pin
PIEBALDconsult10-Dec-14 14:01
mvePIEBALDconsult10-Dec-14 14:01 
GeneralRe: Pet Peeve Pin
StatementTerminator11-Dec-14 8:38
StatementTerminator11-Dec-14 8:38 
GeneralRe: Pet Peeve Pin
PIEBALDconsult11-Dec-14 12:10
mvePIEBALDconsult11-Dec-14 12:10 
GeneralRe: Pet Peeve Pin
StatementTerminator12-Dec-14 3:16
StatementTerminator12-Dec-14 3:16 
GeneralRe: Pet Peeve Pin
PIEBALDconsult12-Dec-14 3:58
mvePIEBALDconsult12-Dec-14 3:58 

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.