Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   inheritance and polymorphism in c# (http://www.go4expert.com/forums/inheritance-polymorphism-c-sharp-t26996/)

hitesh123 22Oct2011 14:34

inheritance and polymorphism in c#
 
In C# we can do polymorphism through inheritance. it allows to define methods in a base class and override those methods with derived class implementations. Thus if we have a base class object that might be holding one of several derived class objects, polymorphism allows to call a method that will work differently according to the type of derived class the object belongs to.


All times are GMT +5.5. The time now is 18:32.