Is it possible to use together any way operator ??
and operator &&
in next case:
bool? Any
{
get
{
var any = this.ViewState["any"] as bool?;
return any.HasValue ? any.Value && this.SomeBool : any;
}
}
This means next:
- if
any
is null thenthis.Any.HasValue
returnfalse
- if
any
has value, then it returns value considering another boolean property, i.e.Any && SomeBool