.NET/ASP.NET Interview Questions:-What is Polymorphism? How does VB.NET/C# achieve polymorphism?
This is a nice and simple OOP interview question. As the name says POLY (Many) MORPHISM (Change). Polymorphism is the ability of the object to behave differently under different conditions. For instance a simple user object can behave as a admin user or as a simple user depending on conditions.
There are two ways of doing polymorphism dynamic and static. Static polymorphism is achieved by using method overloading and dynamic polymorphism is achieved by using method overloading. Please note do confuse with overloading and overriding while answering this question. Many .NET developers make a nice versa statement leading to lot of confusion.
Click her for more 40 fundamentals Most asked Dotnet interview questions
write a comment