title: C# cant cast a class property directly
body: <p>I have a class <code>ResultTable</code> that inherits from Result  </p>
  
  <pre><code>public class ResultTable : Result   
  </code></pre>
  
  <p>Result is a property of <code>ResultWrapper</code>.  </p>
  
  <pre><code>public class ResultWrapper
  {
     public Result Result { get; set; }
  }
  </code></pre>
  
  <p>When I do:  </p>
  
  <pre><code>ResultTable myCastedItem = myResult.Result as ResultTable;  
  </code></pre>
  
  <p>I get the item in <code>myCastedItem</code>, but i want to do it directly like:  </p>
  
  <pre><code>If ( (ResultTable)myResult.Result.DataRows) // It does not let me. 
  </code></pre>
  
  <p><code>DataRows</code> is a member of <code>ResultTable</code> but not of <code>Result</code>.</p>