title: saveFileDialog: The file name is not valid
body: <p>Creating an application in Visual Studio 2015 using C#, I want to save a file to wherever the user wants so I've add a <code>SaveFileDialog</code> object to my project but after setting the properties, whatever file name I enter, the save dialog says: </p>
  
  <blockquote>
    <p>The file name is not valid.</p>
  </blockquote>
  
  <p>(I checked the file path and characters in the file name). </p>
  
  <p>My code to show the dialog:</p>
  
  <pre><code>DialogResult dr = saveFileDialog1.ShowDialog();
  if (dr == System.Windows.Forms.DialogResult.OK)
  {
       Save(saveFileDialog1.FileName);
  }
  </code></pre>
  
  <p>What is the problem?</p>
  
  <p><a href="https://i.stack.imgur.com/sJM3C.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sJM3C.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/nzPnv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nzPnv.jpg" alt="enter image description here"></a></p>