title: File.WriteAllText() statement in C# not creating a file
body: <p>I am still only just learning C# in Visual Studio and I am trying to make a simple text encryption application. My problem at the moment is that when I use the command:</p>
  
  <pre><code>File.WriteAllText(name, inputTextBox.Text);
  </code></pre>
  
  <p>(Where name is the name of the file chosen in a SaveFileDialog and inputTextBox.Text is the text in a textbox on the main form)
  however the file is never actually created. I even tried to build the application and run it as administrator but nothing happened.</p>
  
  <p>What's even weirder is when I opened File Explorer, in the Quick Access section where it shows recent files, all the files that were supposed to be created show up there but don't exist when I click "Open File Location" and if I just try to open them, notepad just tells me the file doesn't exist.</p>
  
  <p>The files are also not in my recycle bin or anything.
  Here's the rest of my code in case it's something wrong with that:</p>
  
  <pre><code>public Form1()
      {
          InitializeComponent();
      }
  
      private void saveButton_Click(object sender, EventArgs e)
      {
          saveDialog.ShowDialog();
      }
  
      private void saveDialog_FileOk(object sender, CancelEventArgs e)
      {
          string name = saveDialog.FileName;
          File.WriteAllText(name, inputTextBox.Text);
      }
  </code></pre>
  
  <p>And in case you're wondering saveDialog is already an element in my form so there's no problem with that.</p>