code_junkie

(any == System.DBNull.Value) vs (any is System.DBNull)

Nov 11th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. if (any == System.DBNull.Value) ...
  2.  
  3. if (DBNull.Value.Equals(value)) {
  4. //
  5. }
  6.  
  7. if (Convert.IsDBNull(value)) {
  8. //
  9. }
Add Comment
Please, Sign In to add comment