What is the difference between Nullable.HasValue or Nullable != null?

The compiler replaces null comparisons with a call to HasValue, so there is no real difference. Just do whichever is more readable/makes more sense to you and your colleagues.

Leave a Comment