AppDomain.SetData Method (String, Object)
Assigns the specified value to the specified application domain property.
Assembly: mscorlib (in mscorlib.dll)
[<SecurityCriticalAttribute>] abstract SetData : name:string * data:Object -> unit [<SecurityCriticalAttribute>] override SetData : name:string * data:Object -> unit
Parameters
- name
-
Type:
System.String
The name of a user-defined application domain property to create or change.
- data
-
Type:
System.Object
The value of the property.
Implements
_AppDomain.SetData(String, Object)| Exception | Condition |
|---|---|
| AppDomainUnloadedException | The operation is attempted on an unloaded application domain. |
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. A method call that attempts to modify a system entry has no effect; the method does not throw an exception. You can inspect the values of system entries with the GetData method, or the equivalent AppDomainSetup properties described in GetData.
You can call this method to set the value of the default timeout interval for evaluating regular expression patterns by supply "REGEX_DEFAULT_MATCH_TIMEOUT" as the value of the name argument and a TimeSpan value that represents the timeout interval as the value of the data argument. You can also insert or modify your own user defined name-data pairs with this method and inspect their values with the GetData method.
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Available since 1.1
Silverlight
Available since 2.0