Conditions and use of if, elseif or ORed ifs
I want to know which of the following is better and why. Can you please let me know your thoughts? - Thanks
Set one
----------
if (varialbe == something)
{
//identical code
}
if (variable == somethingElse)
{
//identical code
}
Set two
----------
if (varialbe == something)
{
//identical code
}
elseif (varialbe == somethingElse)
{
//identical code
}
endif
Set 3
-------
if (varialbe == something || variable == somethingElse)
{
//identical code
}
// identical code - excatly same line of code in both the conditions