cast child object as parent
<p>I need to be able to cast an instance of a child object to an instance of the parent object.</p>

<pre><code>public class Parent 
{
 public string name{get;set;} 
}

public class Child : Parent{}

var myClass = new Child()
(Parent)myClass
//this doesnt seem to work and the object still has childs type.
</code></pre>

<p>is there another way to cast it?</p>

<p>thanks</p>
