title: How to rename a file in C#
body: <p>Consider:</p>
  
  <pre><code>strPath= c:\images\gallery\add.gif
  </code></pre>
  
  <p>I need to rename this file from <code>add.gif</code> to <code>thumb1.gid</code>, and I  should  write one command method, whatever the file name. We need to
  replace that name with this like below.</p>
  
  <pre><code>string strfilename = **"thumb"**
  </code></pre>
  
  <p>****Result thum.gif**</p>
  
  <p><code>strPath= c:\images\gallery\thum.gif</code> **</p>