list?.Count > 0
: Here you compare anint?
to anint
, yielding abool
, since lifted comparison operators return abool
, not abool?
.a?.B
: Here, you have abool?
.if
, however, requires abool
.
list?.Count > 0
: Here you compare an int?
to an int
, yielding a bool
, since lifted comparison operators return a bool
, not a bool?
.a?.B
: Here, you have a bool?
. if
, however, requires a bool
.