Quick question about flow control

I am using the return value of a method to determine what my program does next. What I have below works fine but I'm wondering whether there is a better way of implementing this, as it feels slightly clunky?

int decision = DoSomething(); // where DoSomething returns 0 or 1 if (decision == 1) DoSomethingElse(); 

by Badwolf4 via /r/csharp

Leave a Reply