Editare

Partajați prin


AppDomainSetup.SetConfigurationBytes(Byte[]) Method

Definition

Provides XML configuration information for the application domain, replacing the application's XML configuration information.

public:
 void SetConfigurationBytes(cli::array <System::Byte> ^ value);
public void SetConfigurationBytes (byte[] value);
member this.SetConfigurationBytes : byte[] -> unit
Public Sub SetConfigurationBytes (value As Byte())

Parameters

value
Byte[]

An array that contains the XML configuration information to be used for the application domain.

Remarks

The SetConfigurationBytes method provides a way to replace the configuration information of an application that creates a new application domain. The configuration file information in value replaces the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can replace the configuration information originally obtained from the Example.exe.config file.

Important

Some consumers of configuration file information do not use the information stored by the SetConfigurationBytes method. The runtime does not enforce this. To ensure that all configuration file information is replaced in a new application domain, use the ConfigurationFile property to specify a configuration file. The SetConfigurationBytes method does affect assembly binding.

The XML in value is the same as the XML in a normal configuration file, except that it is stored as a Byte array.

Applies to

See also