Export (0) Print
Expand All

AppDomainSetup.AppDomainInitializer Property

Gets or sets the AppDomainInitializer delegate, which represents a callback method that is invoked when the application domain is initialized.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

member AppDomainInitializer : AppDomainInitializer with get, set

Property Value

Type: System.AppDomainInitializer
A delegate that represents a callback method that is invoked when the application domain is initialized.

To pass information to the callback method, assign an array of strings to the AppDomainInitializerArguments property. The array is passed to the callback method each time an AppDomain is initialized.

The callback method is executed in the context of the newly created application domain.

The following example creates a child application domain named ChildDomain, using an AppDomainSetup object and evidence from the default application domain. The AppDomainInitializer property is set to the callback method AppDomainInit, which is invoked when the child domain is initialized. The arguments for the callback method are placed in an array of strings, which is assigned to the AppDomainInitializerArguments property. When the child domain is created, the callback method simply prints the strings.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft