Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How does VB.NET/C# achieve polymorphism?

Answer Posted / deep

Polymorphism is also achieved through interfaces. Like abstract classes, interfaces also describe the methods that a class needs to implement. The difference between abstract classes and interfaces is that abstract classes always act as a base class of the related classes in the class hierarchy. For example, consider a hierarchy-car and truck classes derived from four-wheeler class; the classes two-wheeler and four-wheeler derived from an abstract class vehicle. So, the class 'vehicle' is the base class in the class hierarchy. On the other hand dissimilar classes can implement one interface. For example, there is an interface that compares two objects. This interface can be implemented by the classes like box, person and string, which are unrelated to each other.

C# allows multiple interface inheritance. It means that a class can implement more than one interface. The methods declared in an interface are implicitly abstract. If a class implements an interface, it becomes mandatory for the class to override all the methods declared in the interface, otherwise the derived class would become abstract.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are merge modules?

1015


Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?

1258


Explain about secure socket layer?

946


What type of code, client-side or server-side, is found in a code-behind file of a Web page?

956


How do you open a page in a new window?

982


How do you deploy your asp.net application?

1051


Explain about ASP.NET?

1074


Where web.config file is used?

1085


What are the Types of state management techniques

1029


What’s the use of “GLOBAL.ASAX” file?

1091


How do I use response redirect?

974


What does passport and windows authentication mean in ASP.NET?

1198


Explain the steps needed to be performed in order to create an animation in xaml?

1008


How to make paging concepts in datagrid in ASP.NET?

1025


Can we have a web application running without web.config file?

985