How to skip directory or file when UnauthorizedAccessException
问题 I am writing an application which checks the computer for viruses from a specific path(including system paths, such as the Windows directory, Program Files, Application Data, etc) The user will click a button "Start scan", will begin checking of system files(including Windows/ProgramFiles directories) for viruses, comparing files to MD5 hashes from a text files named "viruslist.txt" However, I am having some issues with UnauthorizedAccessException errors. The application will stop when it