RuntimeHelpers::PrepareContractedDelegate Method (Delegate^)
Provides a way for applications to dynamically prepare AppDomain event delegates.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- d
-
Type:
System::Delegate^
The event delegate to prepare.
AppDomain event delegates such as DomainUnload, ProcessExit, and UnhandledException are not automatically prepared at startup. You can use the following methods to prepare them:
Attribute the method by using the PrePrepareMethodAttribute attribute.
Attribute the method by using the ReliabilityContractAttribute attribute.
Call the PrepareContractedDelegate method to dynamically prepare the delegate.
For more information, see the article Keep Your Code Running with the Reliability Features of the .NET Framework in the MSDN Magazine.
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Available since 4.0