title: How to pass a variable from one app domain to another
body: <p>I'd like to know, if I have a variable,for example, a string, how to pass its value to my new app domain:</p>
  
  <pre><code>static string _str;
  
  static void Main(string[] args) {
      _str = "abc";
      AppDomain domain = AppDomain.CreateDomain("Domain666");
      domain.DoCallBack(MyNewAppDomainMethod);
      AppDomain.Unload(domain);
      Console.WriteLine("Finished");
      Console.ReadKey();
  }
  
  static void MyNewAppDomainMethod() {
      Console.WriteLine(_str); //want this to print "abc"
  }
  </code></pre>
  
  <p>Thanks</p>