Which one out of following two is best wrt to performance and standard practice. How does .NET internally handles these two code snippets?
Code1
If(r
Here's some additional reading on the guard clause: http://www.c2.com/cgi/wiki?GuardClause
One term I did not see mentioned that I think is important -- the purpose of the guard clause is to increase readability. Single exit methods can tend toward "arrow" code (where nesting of statements makes an arrowhead).