Using instantiated class members as variables in abstract class methods
<p>I'm trying to figure out how to make a method in a base abstract class capable of using member values of instantiated objects derived from the class.  For example, let's say I have a class called <code>Vehicle</code> that inherits an interface called <code>IVehicle</code>;</p>

<pre><code>public abstract class Vehicle : IVehicle
{
    public int Wheels = 4;

    public int CountWheels()
    {
        return Wheels;
    }
}
</code></pre>

<p>Let's say I then had another class called <code>Motorcycle</code> that inherited <code>Vehicle</code> as such;</p>

<pre><code>public class Motorcycle : Vehicle, IVehicle
{
    public int Wheels = 2;
}
</code></pre>

<p>If I make a new <code>Motorcycle</code> called <code>newMotorcycle</code> and I call <code>newMotorcycle.CountWheels()</code>, I get 4 instead of 2.  I'm assuming this is an issue with my <code>Wheels</code> definition in the <code>Motorcycle</code> class, but I've tried just about everything I can think of to get this to work and it always seems to want to ignore child class definitions.  I know that I could make the <code>CountWheels()</code> method abstract and define it in the <code>Motorcycle</code> class, but I'm trying to keep the base <code>Vehicle</code> class as generic as possible so I can implement a ton of other child classes without having to redefine the same method over and over.</p>

<p>My first question; is what I'm trying to do even possible?  If so, what part of my member definition needs to change for this to work the way I'm intending for it to?</p>

<p>I promise I scoured the internet before I posted this here and I couldn't find enough information to help myself...</p>