AppDomainSetup.GetConfigurationBytes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the XML configuration information set by the SetConfigurationBytes(Byte[]) method, which overrides the application's XML configuration information.
public:
cli::array <System::Byte> ^ GetConfigurationBytes();
public byte[] GetConfigurationBytes ();
member this.GetConfigurationBytes : unit -> byte[]
Public Function GetConfigurationBytes () As Byte()
Returns
An array that contains the XML configuration information that was set by the SetConfigurationBytes(Byte[]) method, or null
if the SetConfigurationBytes(Byte[]) method has not been called.
Remarks
The SetConfigurationBytes method provides a way to override the configuration information of an application that creates a new application domain. The configuration file information in value
overrides the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can override the configuration information originally obtained from 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 overridden 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.
To access the configuration bytes for an application domain, use the AppDomain.SetupInformation property to get the AppDomainSetup object for the application domain, then use the GetConfigurationBytes method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기