In C, C++ and C# when using a condition inside a function or loop statement it\'s possible to use a continue or return statement as early as possible and g
The glib answer is that it all depends.
My general feeling is that if condition
is a rare, guard (e.g. check for null) or error condition then I tend to use return
or continue
If it's an expected case then I tend to use your first approach.
Notice, however, that I said "tend". The boundary between these to conditions is vague and subject to change depending on the project and who I'm working with.