.
Abstraction
Abstraction is "the process of identifying common patterns that have systematic variations; an abstraction represents the common pattern and provides a means for specifying which variation to use" (Richard Gabriel).
An abstract class is a parent class that allows inheritance but can never be instantiated. Abstract classes contain one or more abstract methods that do not have implementation. Abstract classes allow specialization of inherited classes.
Polymorphism
Polymorphism allows objects to be represented in multiple forms. Even though classes are derived or inherited from the same parent class, each derived class will have its own behavior. Polymorphism is a concept linked to inheritance and assures that derived classes have the same functions even though each derived class performs different operations.
Virtual keyword
The virtual keyword allows polymorphism too. A virtual property or method has an implementation in the base class, and can be overriden in the derived classes.
To create a virtual member in C#, use the virtual keyword:
public virtual void Draw()
To create a virtual member in VB.NET, use the Overridable keyword:
Public Overridable Function Draw()
Override keyword
Overriding is the action of modifying or replacing the implementation of the parent class with a new one. Parent classes with virtual or abstract members allow derived classes to override them.
Solution for the QlikView, Biztalk, DotNet and MSBI real time development problems
Search This Blog
Monday, June 1, 2009
Subscribe to:
Post Comments (Atom)
Popular Posts
-
.Net Integration with Bill Desk Payment Gateway Introduction: Now-a-days online shopping websites has become very popular, and to h...
-
In earlier versions of ASP.NET, you enable smart navigation by using the Page.SmartNavigation property. When you set the Page.SmartNavigatio...
-
Confirmation box from code behind c# using modalpopup ajax control <% @ Page Language ="C#" AutoEventWireup ="true...
-
MVC: Handling Multiple button submission from one view While developing any web applications we use to design lot more forms. Most of...
-
WWF Related Sites (No need to search for WWF): http://aspalliance.com/1074_An_Introduction_to_Windows_Workflow_Foundation.all http://www.cod...
No comments:
Post a Comment