Asserts that calling code can access the resources identified by the permissions contained in the current instance through the code that calls this method, even if callers have not been granted permission to access the resource.
Type Reason System.Security.Permissions.SecurityPermission Requires permission to perform the assertion security operation. See System.Security.Permissions.SecurityPermissionFlag.Assertion.
Type Reason System.Security.SecurityException The asserting code does not have sufficient permission to call this method.
-or-
This method was called with permissions already asserted for the current stack frame.
Note: This method is the only way to assert multiple permissions at the same time within a frame because only a single assert can be active on a frame at one time; subsequent asserts will result in an exception.Operation
As described above.Usage
Use this method to insure that all callers can access a set of secured resources.
Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0