One approach is to open it "for write", using the access
(System.IO.FileAccess) parameter of some constructors of FileStream.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"melinda" <me*****@discussions.microsoft.com> escribió en el mensaje
news:CB**********************************@microsof t.com...
I have a windows application whose purpose is to read in an xml data file,
allow editing of the data, and finally write the data file back out to the
file.
What's the best way to lock the xml file for the duration of the
application?