I am reading in data from a database and putting it in a DataRow.
I want to test a nullable boolean field for whether it is Null or True.
How can I do the following in VB.NET without it throwing an exception about how the Or operator cannot have DBNull as one of its operands? Can I force lazy-OR evalution so that is just evaluates the IsNull and proceeds no further?
If row.IsNull("MyNullableBooleanField") Or row("MyNullableBooleanField")
Use the ‘OrElse’ operator: