How to resolve an IndexOutOfRangeException on bit value?
问题 I'm reading back a bit value from an SQL table, and casting as a boolean value to map to a boolean model value. But when I read back the IsPDLChecked bit field and initialise as false, I get an index out of range exception . I looked up the definition of the exception and I'm not sure why the value is out of range due to it being init with a false value , ie, 0 . So it's not a negative range value. Question: Why am I getting an IndexOutOfRange exception although the bit value being read back