Validating that all strings in an array match a condition
Yes, return immediately* returns from the method, no matter where in the method you are. You don't need the break.

But there is even easier way to write this code, using the LINQ method All():

strs.All(str =&gt; str == condition)


This also returns as soon as single non-matching element is found and is more readable.



* Actually, finally blocks run before you actually return from the method, but that's not relevant here.