Q:

Creating an object of an inherited class in c#

This should be a pretty straight-forward question. I only ask for a simple easy to understand answer. No, I don't want a textbook definition or a link to documentation, please, if possible answer this as simply as possible.
Consider the following:
class Monster
{
    public int Hp { get; protected set; }
    public string Name { get; protected set; }

    public virtual void Attack()
    {
        Console.WriteLine("Monster attacking!");
    }
}

class Skeleton : Monster
{
    public Skeleton()
    {
        Hp = 20;
        Name = "Skeleton";
    }
    public override void Attack()
    {
        Console.WriteLine("Skeleton attacking!");
    }
}

Now imagine I create a new Skeleton object with the type Monster as so.
 Monster skeleton = new Skeleton();

I would like to know the difference between creating a Skeleton object with a Monster Type vs creating a Skeleton Object with a Skeleton type.
 Skeleton skeleton = new Skeleton();

I don't understand if there's a difference between the two or really how this works. Any and all help appreciated! Thank you!

A:

The benefits to creating a Skeleton object with a Monster type becomes more apparent when you have multiple monsters that you want to hold in a single collection.
For example, you might have a list defined as follows:
List<Monster> EncounterMonsters = new List<Monster>();

Declaring your Skeleton object as Monster allows you to add it to this list, along with any other Monster classes you create.
So, you might have another monster class:
class Ogre : Monster
{
    public Ogre()
    {
        Hp = 50;
        Name = "Ogre";
    }

    public override void Attack()
    {
        Console.WriteLine("Ogre attacking!");
    }
}

You could then do the following:
Monster skeleton = new Skeleton();
Monster ogre = new Ogre();

EncounterMonsters.Add(skeleton);
EncounterMonsters.Add(ogre);

This would then allow you to loop through the EncounterMonsters collection and attack with each using the overridden Attack method for each.

