title: How to know if a ReaderWriterLockSlim is currently write-locked by another thread?
body: <p>How to know if a ReaderWriterLockSlim is currently write-locked by another thread?</p>
  
  <pre><code>ReaderWriterLockSlim rwls = new ReaderWriterLockSlim()
  var i = rwls.CurrentReadCount; 
  // count of reading threads (but unfortunately there's no CurrentWriteCount property)
  var j = rwls.IsWriteLockHeld; 
  // check if current thread is holding the lock (limited to current thread)
  
  /* none of above can do it */
  </code></pre>
  
  <p>yes I can call rwls.TryEnterWriteLock(1) to check if it is write-locked but that will slow down the performence</p>
  
  <p>are there any direct way to get write-lock status ?</p>