Which is a better practice? (I\'m coding in .Net if that makes a difference)
IF condition = true THEN
...true action--even if rare...
ELSE
...action
E
If the most common case isn't the simplest to express, you might have an opportunity for re-factoring
One useful re-factoring I've found:
if (a.getFoo() == 1 && a.getBar() == 2)
can be re-factored to
if (a.isFooBar())
In come cases something nasty like this,
if (!(fooSet.contains(a.getValidFoo())))
could be
if (a.hasInvalidFoo(fooSet))
This can make option 1 also be option 2 by simplifying the evaluation of the most common condition.