c# - Difference between list.Count > 0 and list.Count != 0 -
i have list of things. there difference between list.count > 0
, list.count != 0
? or performance difference in these codes?
if (list.count > 0) // stuff if (list.count != 0) // stuff
note:
list.count
can't less ziro..
is there difference between
list.count > 0
,list.count != 0
?
yes. first 1 evaluates whether list.count
greater 0
. second 1 evaluates whether not equal 0
. "greater than" , "not equal" different things.
Comments
Post a Comment