title: c# file read/write lock
body: <p>I'm uring <code>StreamReader</code> to read/write from/to a file in two threads, read in one and write in other. I want that these two don't occur at the same time. What lock should I use? I looked at some examples but they were using <code>FileStream.Lock</code> and I'm not sure whether I can use that with <code>StreamReader</code> so please clarify.</p>