ThreadLocal<T>.IsValueCreated 属性

定义

获取是否在当前线程上初始化 ValueGets whether Value is initialized on the current thread.

public:
 property bool IsValueCreated { bool get(); };
public bool IsValueCreated { get; }
member this.IsValueCreated : bool
Public ReadOnly Property IsValueCreated As Boolean

属性值

Boolean

如果在当前线程上初始化 Value,则为 true;否则为 false。true if Value is initialized on the current thread; otherwise false.

例外

已释放了 ThreadLocal<T> 实例。The ThreadLocal<T> instance has been disposed.

适用于

另请参阅