title: Clarification on use of class variables?
body: <p>I've been going through some tutorials on properties and class variables, and I understand that if you set a class variable (in the example below, bar) then you can then call a type to cast this object to a specific variable (I did not do this in the example below, just to clarify). But what would happen if you used this same class variable, with an object already stored in it to call a method? In reference to the example below, will the "ok" be passed to the method, or is it simply ignored? I tried running this though this compiler and it didn't seem to have an issue with it, but I'm not sure if it's actually doing anything with the object bar is set to. Thanks for the Help!</p>
  
  <pre><code>public class Foo
  {
  
      public static void Main()
      {
          Foo bar = new Foo();
          object ok = "ok";
          bar = (Foo)ok;
          bar.genericMethod();
      }
  
      public void genericMethod()
      {
      }
  
  }
  </code></pre>