Denies permissions in the set to effectively not have them granted to the code. A subsequent demand for any permission in the set will fail, even if the permission was granted to the code making the call to Deny.
[Visual Basic] Overridable Public Sub Deny() [C#] public virtual void Deny(); [C++] public: virtual void Deny(); [JScript] public function Deny();
Use Deny to temporarily disable permissions granted to code. The duration of Deny is until another Deny in the same stack frame, or until return from the stack frame.
PermissionSet Class | PermissionSet Members | System.Security Namespace