<p>I have some code which ignores a specific exception.  </p>

<pre><code>try
{
    foreach (FileInfo fi in di.GetFiles())
    {
        collection.Add(fi.Name);
    }
    foreach (DirectoryInfo d in di.GetDirectories())
    {
        populateItems(collection, d);
    }
}
catch (UnauthorizedAccessException ex)
{
   //ignore and move onto next directory
}
</code></pre>

<p>of course this results in a compile time warning as ex is unused.  Is there some standard accept noop which should be used to remove this warning?  </p>

Just rewrite it as
```
```
catch (UnauthorizedAccessException) {}
```
```