SecurityContext.Run Method (SecurityContext, ContextCallback, Object)
Runs the specified method in the specified security context on the current thread.
Assembly: mscorlib (in mscorlib.dll)
[SecurityCriticalAttribute] public static void Run( SecurityContext securityContext, ContextCallback callback, object state )
securityContext is null.
securityContext was not acquired through a capture operation.
securityContext has already been used as the argument to amethod call.
The security context for the current thread is returned to its previous state when the method call is complete.
The following code example shows how to use themethod to execute a method in a specified security context.
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Available since 2.0