using System.Security; ... PermissionSet permSet = new PermissionSet(PermissionState.None); bool isDecoded = permSet.CheckDecoded();
using System.Security; using System.Security.Permissions; ... PermissionSet permSet = new PermissionSet(PermissionState.None); permSet.AddPermission(new FileIOPermission(FileIOPermissionAccess.Read, "C:\\Temp\\")); bool isDecoded = permSet.CheckDecoded();In the above code, a new PermissionSet is created with no permissions, and then a new FileIOPermission is added to the set with Read access to a specific file path. The CheckDecoded method is then called, returning true as the permission has been fully decoded. Package Library: This method is part of the System.Security.dll library, which is included in the .NET Framework.