title: Why xmlreader can't read something that xmlwriter wrote?
body: <p>I have the simplest code in the world, </p>
  
  <pre><code>using (XmlWriter writer = XmlWriter.Create(stringWriter))
  {
   writer.WriteStartDocument();
   writer.WriteStartElement("Board");
   writer.WriteAttributeString("Rows", mRows.ToString());
   writer.WriteAttributeString("Columns", mColumns.ToString());
   writer.WriteEndElement();
   writer.WriteEndDocument();
  }
  TextWriter writer1 = new StreamWriter(path);
  writer1.Write(stringWriter.toString());
  writer1.Close();
  </code></pre>
  
  <p>Then i write it to a txt file that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;Board Rows="30" Columns="50"&gt;
  &lt;/Board&gt;
  </code></pre>
  
  <p>Then i do the following :</p>
  
  <pre><code>FileStream str = new FileStream(s.FileName, FileMode.Open);
  using(XmlReader reader = XmlReader.Create(stream))
  {
  reader.Read();
  }
  </code></pre>
  
  <p>And it throws an exception :</p>
  
  <p>"There is no Unicode byte order mark. Cannot switch to Unicode."</p>
  
  <p>I googled the exception and found several workarounds, but i don't understand why i need a work around, i just want to read the xml i wrote.
  Can some one please explain what exactly the problem is ? 
  Should i write something differently in the xml ? </p>
  
  <p>What is the simplest solution to this ?</p>