4
Answers

Preventing an exception from happening when converting to bool

Johnson Bill

Johnson Bill

2y
693
1

Hi,

Which is the best way to prevent this from throwing an exception, e.g. if it's null

(bool)(aDataTable.Rows[0]["aColumn"]))

Thanks

Answers (4)