且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

不是线程安全的-公共静态List< T>

更新时间:2022-05-15 15:32:28

我在MSDN中读到一个List用作公共静态类型时是线程安全的.

I was reading in MSDN that a List is thread safe when used as a public static type.

该说法不正确.您可能是指此文本:

That statement is not true. You probably are referring to this text:

这种公共静态成员是线程安全的.

Public static members of this type are thread safe.

是指类List<T>成员.它确实引用类List<T>实例.

That refers to members of the class List<T>. It does not refer to instances of the class List<T>.