The distinction between static and runtime types in C# is important.
More from this, if you make a new Dog type object in C#, its runtime type is Dog and its static type is Dog. If you upcast the Dog to an Animal then the runtime type is still dog and the static type is Animal.
No comments:
Post a Comment