|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
FileIOPermission usageI read in an old response to a question about the FileIOPermission (from May
5, 2006) that you could use the security imperatively using something like: FileIOPermission perm = new FileIOPermission(FileIOPermissionAccess.Read, path); perm.Demand(); However, code analysis barks at this method with the following: CA2103 A method uses imperative security and might be constructing the permission using state information or return values that can change while the demand is active. So, how exactly should we employ demands when the path changes as the method is called? |
|||||||||||||||||||||||