(DR["Name"] is DBNull) vs (DR["Name"] == DBNull.Value)
C#
2
Posts
2
Posters
0
Views
1
Watching
-
(DR["Name"] is DBNull) vs (DR["Name"] == DBNull.Value) I am curious as to which has better performance? Thanks.
Neither.
DBNull
is a singleton class, the sole instance of which is returned byDBNull.Value
. The code generated by theis
and==
operators is exactly the same. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome