I'm wondering whether situation exists where casting is completely necessary. I'm talking here about casts between classes, not basic types. Is casting (be it
I have a class Animal, and its subclass Dog. I often find myself coding the following lines: if (animal is Dog) { Dog dog = animal as Dog; dog.Name