title: Writing to text file with specific date and time in the file name
body: <p>I am trying to write all my data to a text file and it is working unless I put <code>DateTime</code> in the file name. <br>
  The current code looks like this:</p>
  
  <pre><code>string time = DateTime.Now.ToString("d");
  string name = "MyName";
  File.WriteAllText(time+name+"test.txt","HelloWorld");
  </code></pre>
  
  <p>I am getting this exception:</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll</p>
  </blockquote>
  
  <p>But as far as I know, the <code>File.WriteAllText()</code> method should create a new file or overwrite already existed file.<br><br>Any suggestions?</p>