RuntimeHelpers.PrepareMethod Method (RuntimeMethodHandle)
Prepares a method for inclusion in a constrained execution region (CER).
Assembly: mscorlib (in mscorlib.dll)
Compilers use the method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument.
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.