This question is better suited for Programmers Stack Exchange than Code Review...
To answer your question - if you do evaluations like that it means that most likely you have a design issue at the first place. In most cases you should not branch your logic based on specific type you're working with, since it breaks Open/Closed principle and Liskov substitution principle.
Either your class should be a generic class accepting type of the animal to work with, or there must be a virtual method on
Animal that should be overridden in
Dog, or something else, depending on specifics of your case.
In most cases the
as checks are used to check whether a certain object supports an interface or well-known behaviour like:
object message = ....;
if (message is IEnumerable) //now we know that we can iterate on it
int Count(this IEnumerable source) //"simplified" version of LINQ's extension method
ICollection collection = source as ICollection;
if (collection != null)
int count = 0;
foreach (var element in source)