I used the lib `Nunrar` [site](http://nuget.org/packages/nunrar) to extract a `.rar` file:

```
RarArchive.WriteToDirectory(fs.Name, Path.Combine(@"D:\DataDownloadCenter", path2), ExtractOptions.Overwrite);

```

the decompression works fine, but I can't after this operation of extract delete the original compressed file 

```
System.IO.File.Delete(path);

```

because the file is *is used by another process*
the hole function :

```
 try
           {
               FileStream fs = File.OpenRead(path);
               if(path.Contains(".rar")){

                   try
                   {
                       RarArchive.WriteToDirectory(fs.Name, Path.Combine(@"D:\DataDownloadCenter", path2), ExtractOptions.Overwrite);
                       fs.Close();

                   }
                   catch { }

                   }

           catch { return; }
           finally
           {
               if (zf != null)
               {
                   zf.IsStreamOwner = true; // Makes close also shut the underlying stream
                   zf.Close(); // Ensure we release resources
               }
           }
           try
           {
               System.IO.File.Delete(path);
           }
           catch { }

```

So can I delete the compressed file after extract it?