.
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...
-
What is "Big Data"? The short answer is that size does matter after all. Sometimes big data is measured in terabytes, petabytes...
-
QlikView Interview Questions (QlikView FAQ'S) - Part 1 76. What is the difference between ODBC, OLE DB & JDBC? o ODBC...
-
Qlikview developer, Designer and admin interview questions (Qlikview developer, Designer and admin FAQ’S) 1. Difference between Set ...
-
Use below javascript function to 1) validate the date difference in asp.net 2) difference (number of days, months, years) between two dat...
No comments:
Post a Comment