What's the difference between 'int?' and 'int' in C#?

后端 未结 7 1160
甜味超标
甜味超标 2020-12-02 17:44

I am 90% sure I saw this answer on stackoverflow before, in fact I had never seen the \"int?\" syntax before seeing it here, but no matter how I search I can\'t find the pre

7条回答
  •  遥遥无期
    2020-12-02 18:37

    Int cannot accept null but if developer are using int? then you store null in int like int i = null; // not accept int? i = null; // its working mostly use for pagination in MVC Pagelist

提交回复
热议问题