title: Can I treat a class as a object type?
body: <p>I have a custom class say <strong>class A</strong> :</p>
  
  <pre><code>class A
  {
       public testA:int;
       public testB:int;
  
  }
  </code></pre>
  
  <p>Now, I have a object say <strong>Object C</strong> , the object has the exact same names of variables and everything as the class. </p>
  
  <p>My question can I cast that object into class or vice versa. Instead of set/get of individual variables.</p>