문제

파일 호페어를 사용하고 있습니다. 나에게 오류가 발생합니다.

FileIOPermission fileIOPerm = new FileIOPermission(FileIOPermissionAccess.AllAccess, folderName);
string[] paths = fileIOPerm.GetPathList(FileIOPermissionAccess.AllAccess);`
.

오류는 다음과 같습니다.

argumentException은 처리되지 않았습니다 - 정확히 하나의 플래그를 설정해야합니다.

나는 이것을 googled,이 오류가있는 곳이든지 정보가 없습니다.

도움이 되었습니까?

해결책

From the MSDN documentation

Append , Read, Write, and PathDiscovery access to a file or directory. AllAccess represents multiple FileIOPermissionAccess values and causes an ArgumentException when used as the access parameter for the GetPathList method, which expects a single value.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top