Monday, April 30, 2012

Polymorphism


The word “polymorphism” means “different forms”. Applied in object-oriented
paradigm it means the ability of an entity to exhibit different forms at runtime.
However, why would such a kind of feature be required? One major reason to
have this is to eliminate the type inspection. As we can see in the earlier case
study that we discussed there would also be a type inspection checking at the
client application level where in the employee entities would be used. So just as
in every functionality, we had checked for the type of employee we will also have
to check in the main function about the type of employee we are handling. With
polymorphism, we can have this level of type inspection also being eradicated
totally.

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...