title: How to deserialize xml to object without locking the file?
body: <p>I have an xml file which i use for database, meaning that the xml is updated frequently. 
  For the  xml database have a FileWatcher, and once the xml is updated i get an event and then i deserialize the xml into object and check if there were indeed changes.</p>
  
  <p>The problem that i have is that once i deserialize the xml, the Stream Reader is locking the file so i might get exceptions when trying to update it.</p>
  
  <p>Is there a possibility to deserialize the xml without locking the file?</p>
  
  <pre><code>        XmlSerializer serializer = new XmlSerializer(typeof (MyType));
          Stream reader = new FileStream(File, FileMode.Open);
          var myType = (MyType) serializer.Deserialize(reader);
  </code></pre>