Inheritance will tightly couple the behaviour of the Cat and Dog to that of an Animal. Which may be what you want.
However, if you are trying to create a universe where anything is possible, and an animal can change its type, you may prefer to use the identifier approach..
But you can take this further.
According to the Gang of Fours design patterns you should
"Favor 'object composition' over 'class inheritance'."
An animal is only a dog because it has a tail that wags and it barks. In your universe where over time a dog might learn to talk, you will want to be able to modify this behaviour.
You could then try abstracting out its behaviour, and then within this behaviour you could use inheritance.
With this class structure :
class Tail
{
DoYourThing()
}
class WaggyTail : Tail
{
DoYourThing()
{
// Wag
}
}
class Noise
{
DoYourThing()
}
class Bark : Noise
{
DoYourThing()
{
// Bark
}
}
class Talk : Noise
{
DoYourThing()
{
// Talk
}
}
class Animal
{
public Noise { get; set; }
public Tail { get; set; }
}
You can set up your cats and dogs :
Animal dog = new Animal { Noise = new Bark(), tail = new DoggyTail() }
Animal cat = new Animal{ Noise = new Purr(), tail = new CattyTail() }
.. then when you need your super breed you can simple change their behaviour
dog.Noise = new Talk();
.. Hey presto, your dog can now talk.. If you need your dog to then Sing, you just create a new Sing class.. no further changes needed.