bool.Parse
bool blnSuccess = comm.Parameters["@Success"].Value.ToString() == "1" ? true : false;
string i = comm.Parameters["@Success"].Value.ToString(); bool b = bool.Parse(i == "1" ? "true" : "false"); //OR bool b = i== "1" ? true : false;
//OR
bool b = ((i == "0")? false : true);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)