title: read/write locking a static var in asp.net
body: <p>I've got a static variable (abstract data type, not a primitive) in my C# ASP.NET project.</p>
  
  <p>It will be read by many threads, concurrently and frequently.</p>
  
  <p>I need to write to it very rarely (compared to number of reads).</p>
  
  <p>What is the best way of ensuring threadsaftey so that whilst im writing to it, other threads aren't reading partially-written data?</p>
  
  <p>I've only ever used <code>lock</code>, but i understand this will prevent concurrent reads :(</p>
  
  <p>Thanks</p>