Click here to Skip to main content
15,891,951 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: Multiple returns from methods or clean code flow Pin
sasadler18-Feb-19 5:43
sasadler18-Feb-19 5:43 
GeneralRe: Multiple returns from methods or clean code flow Pin
CodeWraith18-Feb-19 6:05
CodeWraith18-Feb-19 6:05 
GeneralRe: Multiple returns from methods or clean code flow Pin
sasadler18-Feb-19 9:42
sasadler18-Feb-19 9:42 
GeneralRe: Multiple returns from methods or clean code flow Pin
CodeWraith18-Feb-19 13:18
CodeWraith18-Feb-19 13:18 
GeneralRe: Multiple returns from methods or clean code flow Pin
sasadler19-Feb-19 5:32
sasadler19-Feb-19 5:32 
GeneralRe: Multiple returns from methods or clean code flow Pin
CodeWraith19-Feb-19 5:50
CodeWraith19-Feb-19 5:50 
GeneralRe: Multiple returns from methods or clean code flow Pin
sasadler19-Feb-19 6:16
sasadler19-Feb-19 6:16 
AnswerRe: Multiple returns from methods or clean code flow Pin
Simon_Whale15-Feb-19 6:00
Simon_Whale15-Feb-19 6:00 
That is the best advice I have seen from re-sharper and I've seen it show some bad alternatives

one was and only know it was re-sharper as the Dev stated it was what re-sharper advised him to use

C#
public bool someMethod(int valueA, bool Valueb, bool ValueC)
{
  var output = DoSomethingElse(ValueA, ValueB) ? RunAnotherMethod(ValueA, output.SOmething) :
                DoAnotherMethod(ValueB, ValueC) ? RunAthoerMethod(ValueB, output.SomethingElse) :
                 DoYetAnotherMethod(ValueA, ValueC) RunAnotherMethod(DoYetAnotherMethod(ValueA, ValueC), output.AgainSomethingElse);                  
}


This horrid IF ELSE statement contains 16 if's

Footnote: I don't like using Resharper
Every day, thousands of innocent plants are killed by vegetarians.

Help end the violence EAT BACON

GeneralRe: Multiple returns from methods or clean code flow Pin
  Forogar  15-Feb-19 6:02
professional  Forogar  15-Feb-19 6:02 
GeneralRe: Multiple returns from methods or clean code flow Pin
CodeWraith15-Feb-19 8:06
CodeWraith15-Feb-19 8:06 
GeneralRe: Multiple returns from methods or clean code flow Pin
charlieg15-Feb-19 17:13
charlieg15-Feb-19 17:13 
AnswerRe: Multiple returns from methods or clean code flow Pin
User 483504715-Feb-19 6:09
User 483504715-Feb-19 6:09 
AnswerRe: Multiple returns from methods or clean code flow Pin
Jörgen Andersson15-Feb-19 6:10
professionalJörgen Andersson15-Feb-19 6:10 
GeneralRe: Multiple returns from methods or clean code flow Pin
OriginalGriff15-Feb-19 6:11
mveOriginalGriff15-Feb-19 6:11 
GeneralRe: Multiple returns from methods or clean code flow Pin
Jörgen Andersson15-Feb-19 6:13
professionalJörgen Andersson15-Feb-19 6:13 
GeneralRe: Multiple returns from methods or clean code flow Pin
Jon McKee15-Feb-19 15:24
professionalJon McKee15-Feb-19 15:24 
AnswerRe: Multiple returns from methods or clean code flow Pin
OriginalGriff15-Feb-19 6:10
mveOriginalGriff15-Feb-19 6:10 
GeneralRe: Multiple returns from methods or clean code flow Pin
Jörgen Andersson15-Feb-19 6:15
professionalJörgen Andersson15-Feb-19 6:15 
GeneralRe: Multiple returns from methods or clean code flow Pin
megaadam17-Feb-19 22:15
professionalmegaadam17-Feb-19 22:15 
GeneralRe: Multiple returns from methods or clean code flow Pin
OriginalGriff17-Feb-19 22:49
mveOriginalGriff17-Feb-19 22:49 
GeneralRe: Multiple returns from methods or clean code flow Pin
megaadam18-Feb-19 2:29
professionalmegaadam18-Feb-19 2:29 
GeneralRe: Multiple returns from methods or clean code flow Pin
André Pereira18-Feb-19 4:42
André Pereira18-Feb-19 4:42 
GeneralRe: Multiple returns from methods or clean code flow Pin
milo-xml18-Feb-19 1:47
professionalmilo-xml18-Feb-19 1:47 
AnswerRe: Multiple returns from methods or clean code flow Pin
lopatir15-Feb-19 6:18
lopatir15-Feb-19 6:18 
GeneralRe: Multiple returns from methods or clean code flow Pin
André Pereira18-Feb-19 4:46
André Pereira18-Feb-19 4:46 

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.