+ 1
Polymorphism
Can somebody explain what āvirtualā and āoverrideā does? Iām at the lesson, but it didnāt really explain well. (And, if possible, please state real world examples, or understandable ones.)
1 Answer
+ 1
Polymorphism is the ability for code to behave different due to the way it was created.
You can define a method as virtual.
This allowes derived class to change the behaviour of that method.
https://code.sololearn.com/c7P1Q7lSmIWU
Hope this clearify's a bit.
https://www.w3schools.com/cs/cs_polymorphism.asp
https://www.tutlane.com/tutorial/csharp/csharp-polymorphism