title: sharing variables between running applications in C#
body: <p>I am developing in C# two simple applications, running in the same local machine without network requirements.</p>
  
  <p>The first application initializes an DLL (Class1) and set a variable. The second application just read it the data which was previously stored. Both applications instanciates the same Class1.</p>
  
  <p>Code:</p>
  
  <ul>
  <li><p>DLL (Class1):</p>
  
  <pre><code>public class Class1
  {
  
  private string variableName;
  
  public string MyProperty
   {
      get { return variableName; }
      set { variableName = value; }
    }
  
  }
  </code></pre></li>
  <li><p>Application A:</p>
  
  <pre><code>class Program
  {
  static void Main(string[] args)
  {
      Class1 class1 = new Class1();
  
      string localReadVariable = Console.ReadLine();
  
      class1.MyProperty = localReadVariable;
  
     }
  }
  </code></pre></li>
  <li><p>Application B:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
  {
      ClassLibraryA.Class1 localClass = new ClassLibraryA.Class1();
  
      string z = localClass.MyProperty;
  
      Console.WriteLine(z);
  }
  }
  </code></pre></li>
  </ul>
  
  <p>My problem is that I do not know how to read a variable from another thread.</p>
  
  <p>Application B must read the "variableName" set by application B</p>
  
  <p>Thank you</p>