That's a good scenario for a "pre-check"! :) The problem is that, as the documentation states, Demand checks callers higher in the stack. While all callers higher in the stack may have the permission, you may not. So, lets say you add this code in an event handler you've assigned to an event defined in the BCL assemblies (like handling Button.Click or something). Invoking the delegate (your handler) happens from the BCL. Those assemblies would have FullTrust permissions, but you might not. Now, when you simply call File.Delete, you become the caller and don't have that permission, so the SecurityException is thrown. A simple work-around is to attempt to create a dummy file (and delete it, if successful). If you can't write the file, you won't be able to delete a file (well, at least from the CLR's perspective).
Microsoft MVP, Visual C# My Articles