System.AppDomain.SetData Method

Assigns the specified value to the specified application domain property.

Syntax

public void SetData (string name, object data)

Parameters

name
The name of a user-defined application domain property to create or change.
data
The value of the property.

Remarks

Use this method to insert an entry, or modify 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 cannot insert or modify system entries with this method. You can inspect their values with the AppDomain.GetData(string) method, or the equivalent AppDomainSetup properties described in AppDomain.GetData(string).

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

Requirements

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