Is int? thread safe?

前端 未结 3 1737
生来不讨喜
生来不讨喜 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:06

    From http://msdn.microsoft.com/en-us/library/b3h38hb0.aspx:

    Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

提交回复
热议问题