true if the current thread acquires the lock; otherwise, false.
Type Reason ArgumentNullException obj is null.
If successful, this method acquires an exclusive lock on the obj parameter. This method returns immediately, whether or not the lock is available.
This method is similar to Monitor.Enter(object), but it will never block. If the thread cannot enter without blocking, the method returns false, and the thread does not enter the critical section.
Use System.Threading.Monitor to lock objects (that is, reference types), not value types. For details, see Monitor.Enter(object) and the conceptual topic [<topic://cpconMonitor>].