title: Delete files in temp folder in C#
body: <p>I am working in Visual Studio 2015 and I am using C#. So I created Windows Form and I added a button named "button1". What I am trying to do is: when user clicks a button, the <strong>content of folder</strong>, named ( let´s say ) temp, located in C:/temp, is deleted, but the <strong>temp folder still remains</strong>. </p>
  
  <p>I have tried to use this:</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
      {
          string strCmdText;
          strCmdText = "del /q/f/s %TEMP%\* ";
          System.Diagnostics.Process.Start("CMD.exe", strCmdText);
      }
  </code></pre>
  
  <p>But I was told that this method is useful so I didn't use it anymore. And it also kept throwing an exception: "Unrecognized escape sequence". 
  I was also told I should use System.IO namespace, I also tried to look for tutorials but I didn't find them useful.</p>