✅ Interface in C#
Hello, I have a question, consider the following code:
My question is, an interface is just like an abstract class in the sense that we can' instantiate directly but rather should be instantiated indirectly by using a derived class from it.
When we write:
I don't understand, we are creating a Dog object, this references a dog? What is the
My question is, an interface is just like an abstract class in the sense that we can' instantiate directly but rather should be instantiated indirectly by using a derived class from it.
When we write:
I don't understand, we are creating a Dog object, this references a dog? What is the
IAnimal data type? What does it represents and why not use Dog instead?