bool? ispurchased = null; var pospurcahsed= ispurchased ? \"1\":\"2\";
Its generating exception .
Cannot implicitly con
You should use .value
bool? ispurchased = null; if (ispurchased.HasValue) { var pospurcahsed = ispurchased.Value ? "1" : "2"; }