共用方式為


RuntimeHelpers.PrepareContractedDelegate(Delegate) 方法

定義

警告

The Constrained Execution Region (CER) feature is not supported.

提供讓應用程式動態準備 AppDomain 事件委派的方法。

public:
 static void PrepareContractedDelegate(Delegate ^ d);
[System.Obsolete("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId="SYSLIB0004", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void PrepareContractedDelegate (Delegate d);
public static void PrepareContractedDelegate (Delegate d);
[System.Security.SecurityCritical]
public static void PrepareContractedDelegate (Delegate d);
[<System.Obsolete("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId="SYSLIB0004", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member PrepareContractedDelegate : Delegate -> unit
static member PrepareContractedDelegate : Delegate -> unit
[<System.Security.SecurityCritical>]
static member PrepareContractedDelegate : Delegate -> unit
Public Shared Sub PrepareContractedDelegate (d As Delegate)

參數

d
Delegate

要準備的事件委派。

屬性

備註

AppDomain 事件委派,例如 DomainUnloadProcessExitUnhandledException 不會在啟動時自動備妥。 您可以使用下列方法來準備它們:

如需詳細資訊,請參閱 MSDN Magazine 中,使用 .NET Framework 的可靠性功能保持程式碼執行一文。

適用於