Most of our development is done in vb.net (not my choice) and one frequently used code pattern uses an \'On Error GoTo\' followed by a \'Resume Next\' so that all database f
In VB 9.0, "IF" is a true coalescing operation equivalent to C#'s "??". Source MSDN:
So you could use:
oObject.Name = IF(oReader.Item("Name").Equals(DBNull.Value),string.Empty,DirectCast(oReader.Item("Name"), String))