What is the integer reference type in C#?

前端 未结 8 1179
日久生厌
日久生厌 2021-01-11 12:46

I\'d like to have an integer variable which can be set to null and don\'t want to have to use the int? myVariable syntax. I tried using int and

8条回答
  •  -上瘾入骨i
    2021-01-11 13:23

    Nullable types are instances of the System.Nullable(T) struct.
    Therefore int, int?, Nullable are all value types, not reference types

提交回复
热议问题