If you use .Net 4.0 or above, as far as I know, the recommended way is to use System.Threading.ThreadLocal<T>
which also gives lazy initialization as a bonus.
If you use .Net 4.0 or above, as far as I know, the recommended way is to use System.Threading.ThreadLocal<T>
which also gives lazy initialization as a bonus.