C# can an inherited method or property use the derived class members without creating a new method?
<p>I'm coding a simple game using C# to help me learn basic object oriented concepts.</p>

<p>In this code below:</p>

<pre><code>class entity
    {
    int hp;
    string name;

    public entity()
    {
        hp = 1;
        name = "entity";
    }

    public string status()
    {
        string result;
        result=name + "#" + " HP:" + hp;
        return result;
    }






    class dragon : entity
    {

    new public string name;
    new int hp;


    public dragon()
    {
        hp = 100;
        name = "Dragon";

    }
}
</code></pre>

<p>I made an object for "Dragon" as such</p>

<pre><code>dragon mydragon = new dragon();
</code></pre>

<p>The problem is with the following code:</p>

<pre><code>mydragon.status();
</code></pre>

<p>This returns a string but with the "name" and "hp" of the <strong>entity</strong> class object (i.e. hp=1, name=entity).</p>

<p>I'd like to have this return the dragon object's values (hp=100, name=dragon). I'm not sure what I'm doing wrong but it seems dead simple.</p>

<p>After fiddling and struggling for hours, the only solution I could come to was to simply copy &amp; paste the <strong>status()</strong> method over to the dragon class. But I'm sure there's a better way to do this.</p>

<p>Many thanks in advance.</p>
