title: Deleting a file forcefully even though it is being used by the other process
body: <p><BR>
  I am developing a application which requires to delete a file no matter it is being used by other process</p>
  
  <p>Consider the following snippet of code.</p>
  
  <pre><code>using System;
  using System.IO;
  
  namespace DotNet_Concepts.File_Operation
  {
      class Deleting_File_Which_Is_In_Use
      {
          static void Main(string[] args)
          {
              StreamReader lclFileStream = null;
              string lclFileName=string.Empty;
              try
              {
                  lclFileName=@"E:\Visual Studio 2008 Projects\DotNet Concepts\DotNet Concepts\Local Files\Garbage.txt";
                  if (File.Exists(lclFileName))
                  {
                      lclFileStream = new StreamReader(lclFileName);
                      if (lclFileStream != null)
                      {
                          //Doing some operation
                      }
                      //Deleting the file before closing the stream
                      File.Delete(lclFileName);
                  }
              }
              catch (Exception ex)
              {
  
                  System.Diagnostics.Debug.WriteLine(ex.StackTrace);
              }
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>I am deleting the file which is used by the same process. Is it possible to delete the file
  <BR></p>
  
  <p>Thanks,
  Amit Shah</p>