JetBrains Rider
 
2024.3
Get JetBrains Rider

Code inspection: Change lock field type to 'System.Threading.Lock'

Last modified: 08 November 2024

Starting from C# 13, in lock statements it is suggested to use a dedicated object instance of the System.Threading.Lock type for the best performance and readability.

This inspection identifies other types used in lock statements and suggests replacing the type of the corresponding field to System.Threading.Lock.