title: How to pass values from one class to another class using wpf?
body: <p>I would like to pass values from one class file to another class.</p>
  
  <p>E.g:</p>
  
  <p><strong>Step1:</strong></p>
  
  <p>Class1.cs</p>
  
  <pre><code>public class Class1
      {
          public string LogedInPerson { get; set; }
  
          public string Name
          {
              get { return this.LogedInPerson; }
              set { this.LogedInPerson = value; }
          }
      }
  </code></pre>
  
  <p><strong>Step2:</strong></p>
  
  <p>Value has been assigned in below method:</p>
  
  <p>test.xaml.cs</p>
  
  <pre><code>public void assignValue()
  {
       Class1 obj = new Class1();
       obj.LogedInPerson = "test123";
  }
  </code></pre>
  
  <p><strong>Step3:</strong></p>
  
  <p>I would like to get "test123" values from Class2.cs.</p>
  
  <p>E.g:</p>
  
  <pre><code>public void test()
          {
              string selected_dept = ?? //How to get "test123" from here.
          }
  </code></pre>