Note: This API is now obsolete.
Assembly: mscorlib (in mscorlib.dll)
A previous call to has already restricted the permissions for the current stack frame.
This method prevents callers higher in the call stack from accessing the protected resource through the code that calls this method, even if those callers have been granted permission to access it. The call stack is typically represented as growing down, so that methods higher in the call stack call methods lower in the call stack.
can limit the liability of the programmer or help prevent accidental security vulnerabilities because it helps prevent the method that calls from being used to access the resource protected by the denied permission. If a method calls on a permission, and if a Demand for that permission is invoked by a caller lower in the call stack, that security check fails when it reaches the .
is ignored for a permission that is not granted because a demand for that permission cannot succeed.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.