To check if a value is null with DBNull, you can also use
DBNull.Value.Equals(o)

that should handle the casting for you.

Reply via email to