How to use Conditional Operation with Nullable Int

前端 未结 5 1433
一生所求
一生所求 2021-02-15 12:38

A small problem. Any idea guys why this does not work?

int? nullableIntVal = (this.Policy == null) ? null : 1;

I am trying to return null

5条回答
提交回复
热议问题