I get the error "cannot implicitly convert type 'string' to 'bool'" with the following code. Can someone please tell me what I need to do? I'm new at this! Thanks!
private bool ValidateStatusCommit()
{
string status = ddlStatus.Text;
if (status = "I")
return true;
else
return false;
}
Cannot implicitly convert type 'string' to 'bool'
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Gaurish Kumar108 reputationPosted Jan 11, 2010, 5:59 PM EST
try this
private bool ValidateStatusCommit()
{
string status = ddlStatus.Text;
if (status == "I")
return true;
else
return false;
}