i created one flag Method1HasExecuted ,,the logic which i wanted to achieve is if that flag true i need to do this function rp = Spa.Modify(val); otherwise return rp as false.For that i did like this
if (Method1HasExecuted)
{
rp = Spa.Modify(val);//Save operation, this function also return boolean value
}
else rp = false;
Then for optimization i used ternary operator and did like this
return Method1HasExecuted ? Spa.ClientModify() : false;
But by doing this way down side i saw some unreachable code which was already there like this
1.how to make it reachable or here using ternary operator is not required?
2.After catch block we can see return retval;
on bottom is that required since the outcome of all work is either true which
will do the Save operation or false means display serverdown,which already there in my work
for second question the whole structure is like this now