The MSDN constructor for a FileStream says that it may throw either an UnauthorizedAccessException or a SecurityException. Here's what MSDN says about these exceptions.
UnauthorizedAccessException: The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.
SecurityException: The exception that is thrown when a security error is detected.
How are these two similar exceptions different? What situations will trigger either of them?