title: static variables of a class used in different AppDomains
body: <p>I have two executables that reference the same Class Library. In the class library I have a static variable.
  How can that static variable persists on the two different executables?</p>
  
  <p>This is how it looks:</p>
  
  <pre><code>public class MyClass
  {
      public static string MyVar;
  }
  </code></pre>
  
  <p>App 1:</p>
  
  <pre><code>public class MyApp1
  {
        public void SomeMethod()
        {
             MyClass.MyVar = "hello";
        }       
  }
  </code></pre>
  
  <p>App 2:</p>
  
  <pre><code>public class MyApp2
  {
        public void SomeOtherMethod()
        {
             if(MyClass.MyVar == "hello")    
                  DoSomething();
        }       
  }
  </code></pre>