I can in no way advocate checking locks then entering code blocks. However, I found this thread while looking for a way to check a new function couldn't leave an object locked. A unit test based on Monitor.IsEntered got me exactly what I was looking for.