title: How to save a text file in Hard Disk using C#
body: <p>I'm creating a logger for my app and I'm stuck with a problem I need to save my log file in my C drive but when I'm executing the Code its give me an error "Given Path Format Is Not Supported" My current code is given below</p>
  
  <pre><code>string path="C:\\Logger\\"+DateTime.Now.Date.ToString()+".txt";
  
      public void CreateDirectory()
      {
          if(!File.Exists(path))
          {
              File.Create(path);
          }
      }
  </code></pre>
  
  <p>any solutions????</p>