I've need to do some refactoring and I came across to this:
if(LoanTerms.RateIncreasable.HasValue && LoanTerms.RateIncreasable.Value) { ... }
and LoanTerms.RateIncreasable
is type of bool?
So I'm wondering do I need .HasValue
check on this? Will null
be treated like false in if statement?
Aucun commentaire:
Enregistrer un commentaire