System.AppDomain.GetData Method

Gets the value stored in the current application domain for the specified name.

Syntax

public object GetData (string name)

Parameters

name
The name of a predefined application domain property, or the name of an application domain property you have defined.

Returns

The value of the name property, or null if the property does not exist.

Remarks

Use this method to retrieve the value of an entry in an internal cache of name-data pairs that describe properties of this instance of AppDomain.

The cache automatically contains predefined system entries that are inserted when the application domain is created. You can inspect their values with the AppDomain.GetData(string) method, or the equivalent AppDomainSetup properties.

You can insert or modify your own user defined name-data pairs with the AppDomain.SetData(string, object) method and inspect their values with the AppDomain.GetData(string) method.

The following table describes the name of each predefined system entry and its corresponding AppDomainSetup property.

"APPBASE"

AppDomainSetup.ApplicationBase

"LOADER_OPTIMIZATION"

AppDomainSetup.LoaderOptimization

"APP_CONFIG_FILE"

AppDomainSetup.ConfigurationFile

"DYNAMIC_BASE"

AppDomainSetup.DynamicBase

"DEV_PATH"

(no property)

"APP_NAME"

AppDomainSetup.ApplicationName

"PRIVATE_BINPATH"

AppDomainSetup.PrivateBinPath

"BINPATH_PROBE_ONLY"

AppDomainSetup.PrivateBinPathProbe

"SHADOW_COPY_DIRS"

AppDomainSetup.ShadowCopyDirectories

"FORCE_CACHE_INSTALL"

AppDomainSetup.ShadowCopyFiles

"CACHE_BASE"

AppDomainSetup.CachePath

(application specific)

AppDomainSetup.LicenseFile

"APP_LAUNCH_URL"

(no property)

Note:

"APP_LAUNCH_URL" represents the URL originally requested by the user, before any redirection. It is available only when the application has been launched with a browser such as Internet Explorer. Not all browsers provide this value.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0