Leaky Abstraction strikes again: FileStream.Lock() gotchas
First, if you don’t know the Law of Leaky Abstractions go on and read here (10 minutes well spent!). .NET’s FileStream.Lock() is a handy method that lets you lock a section of a file (instead of locking it completely) so that other processes/threads cannot touch that part. The usage is fairly simple: you specify from [...]