C # HasValue vs! = Null

My question may seem a little silly, but it torments me every time I come across this. What's the difference between:

where value.HasValue 

and

 where value != null 

Does HasValue check if value null?

+49
null c #
Jul 22 '13 at 9:24
source share
1 answer

They both do the same, just pick one and stick to it so you have a sequence. There is nothing to win using either at the end.

+53
Jul 22 '13 at 9:27
source share



All Articles