Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Latest commit

 

History

History
25 lines (17 loc) · 1.15 KB

DE0008.md

File metadata and controls

25 lines (17 loc) · 1.15 KB

DE0008: Thread culture properties shouldn't be used

Motivation

Thread culture properties don't work consistently across operating systems and runtimes when used against any thread other than the current thread.

  • In .NET Core, if a thread tries to read or write these properties on a different thread, an InvalidOperationException is thrown.

  • In .NET Framework, setting these properties isn't reliable for a different thread.

Recommendation

Use CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture instead.