Multiple if blocks or a single if with AND condition
- by Ram
If I need to check multiple conditions, which is the preferred way with respect to performance
if( CND1 && CND2 && CND3 && CND4)
{
}
else
{
}
or
if(CND1)
{
if(CND2)
{
if(CND3)
{
if(CND4)
{
}
else
{
}
}
else
{
}
}
else
{
}
}
}