unreachable code detected
Posted
by xrx215
on Stack Overflow
See other posts from Stack Overflow
or by xrx215
Published on 2010-04-06T16:03:32Z
Indexed on
2010/04/06
16:13 UTC
Read the original article
Hit count: 233
c#
Hi..
I am getting unreachable code detected for the second if statement acn you please let me know what went wrong..
private bool ValidateSettings()
{
if(chkDownload.Checked && String.IsNullOrEmpty(txtAppName.Text))
{
divAppDownloadError.Visible=true;
return false;
}
else
{
return true;
}
if (chkpplaORfmp.Checked && String.IsNullOrEmpty(txtfmpORppla.Text))
{
divXPAAPPDownloadError.Visible = true;
return false;
}
else{
return true;
}
}
© Stack Overflow or respective owner