else or return?
Posted
by Ram
on Stack Overflow
See other posts from Stack Overflow
or by Ram
Published on 2010-05-17T11:39:42Z
Indexed on
2010/05/17
11:50 UTC
Read the original article
Hit count: 91
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(result)
{
process1();
}
else
{
process2();
}
Or Code 2
If(result)
{
process1();
return;
}
process2();
© Stack Overflow or respective owner