Well, I would expect the datarow == null to be more performant, as it is
less operations. The former comparison has to make the call to the
property/field, and then perform the comparison whereas the latter is just
checking the reference to see if it is null.
However, this is comparing apples to oranges, since you are not making
to comparisons that have the same semantics, so the previous point is pretty
moot.
Also, I think this could easily be considered a severe case of
micro-optimization.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
lianqtlit said:
Is there a difference between datarow.length == 0 and datarow == null in
terms of performance?