ThreadLocal<T>.Values 屬性

定義

取得清單,其中包含已存取這個執行個體的所有執行緒目前所儲存的所有值。Gets a list for all of the values currently stored by all of the threads that have accessed this instance.

public:
 property System::Collections::Generic::IList<T> ^ Values { System::Collections::Generic::IList<T> ^ get(); };
public System.Collections.Generic.IList<T> Values { get; }
member this.Values : System.Collections.Generic.IList<'T>
Public ReadOnly Property Values As IList(Of T)

屬性值

已存取這個執行個體的所有執行緒目前所儲存之所有值的清單。A list for all of the values currently stored by all of the threads that have accessed this instance.

例外狀況

由於這個執行個體是在類別建構函式呼叫中將 trackAllValues 引數設定為 false 來初始化,因此無法使用所有執行緒所儲存的值。Values stored by all threads are not available because this instance was initialized with the trackAllValues argument set to false in the call to a class constructor.

ThreadLocal<T> 執行個體已經過處置。The ThreadLocal<T> instance has been disposed.

適用於