Use the SetData(String, Object) method to create a new value pair : AppDomain « Reflection « VB.Net Tutorial






Imports System
Imports System.Reflection

Class ADGetData   

   Public Shared Sub Main()
      Dim currentDomain As AppDomain = AppDomain.CurrentDomain
      currentDomain.SetData("ADVALUE", "Example value")
      Console.WriteLine(("ADVALUE is: " & currentDomain.GetData("ADVALUE")))
      Console.WriteLine("System value for loader optimization: {0}", _
         currentDomain.GetData("LOADER_OPTIMIZATION"))

   End Sub 
End Class








19.7.AppDomain
19.7.1.Use ExecuteAssembly on two different domains.
19.7.2.Execute code in another application domain
19.7.3.Use the SetData(String, Object) method to create a new value pair