title: Non-static object from a static method
body: <p>I have a simply C# class.</p>
  
  <p>In this class I have an object, that is initialized in the constructor of the class itself.</p>
  
  <p>I make some mods/update to the attribute of this class (I have did it step by step debugging).</p>
  
  <p>From another class, I want to get this objects updated, so I made a static method, which returns this objects.</p>
  
  <p>But whem I call this method, I get the object with value of the initialitation, not with the new values. Why? Is it wrong? How can I get it?</p>
  
  <p>This is a simplier version of my code:</p>
  
  <pre><code>public class class1 
  {
      private static MyObject p_var;
      public  MyObject MyVar
      {
          get { return p_var; }
          set { p_var= value; }
      }
  
      public static MyVar getVar(){
          MyVar w = p_var;
          return w;
      }
  
      public class1() {
          Debug.WriteLine("kjkjkj");
  
          MyVar= new MyObject ();
          MyVar.attr1 = "test init";
  
     }
  }
  </code></pre>
  
  <p>EXAMPLE: If I call getVar from another class, I get the MyVar object with attr1 value like "test init" and not the new modded valuel.</p>