bool? ispurchased = null; var pospurcahsed= ispurchased ? \"1\":\"2\";
Its generating exception .
Cannot implicitly con
You can't use Nullable or bool? in condition directly, instead use it like:
Nullable
bool?
var pospurcahsed= (ispurchased.HasValue && ispurchased.Value) ? "1":"2";