mohammed shamsheer

mohammed shamsheer

  • NA
  • 394
  • 143.9k

Only assignment, call,increment and new object expressions c

Sep 2 2013 3:13 AM


string isEditable=grdDesignation.DataKeys[index].Values["IsDeletable"].ToString();
if (isEditable == "True")
            {
                chkEditable.Checked = true;
            }
            else
            {
                chkEditable.Checked = false;
            }



I just shortned the code to below like this but showing the errors 
Only assignment, call,increment and new object expressions c

(isEditable == "True") ? chkEditable.Checked=true : chkEditable.Checked = false;

Answers (6)