Is int? thread safe?

前端 未结 3 1710
生来不讨喜
生来不讨喜 2020-12-03 10:20

I know that in .Net all 32-bit types (e.g, int, bool, etc) are thread safe. That is, there won\'t be a partial write (according to the specificatio

3条回答
  •  执笔经年
    2020-12-03 11:04

    No, since an int? is actually a struct (Nullable) composed of an int and a bool.

提交回复
热议问题