Monday, April 30, 2007

Using the Validation Controls in ASP.NET 2.0 > Using the ValidationSummary Control

Using the Validation Controls in ASP.NET 2.0 > Using the ValidationSummary Control: "Using the Validation Controls in ASP.NET 2.0"

polymorphism concept

"polymorphism can be acheived two ways
overloading - static binding/early binding
overriding - dynamic binding/late binding

in case of overloading, you will have same method names with different signatures within a class.
display(char arr[])
display(char arr[], int sub)
display(char arr[], char subarr[])
display(char arr[],char subarr[],int sub)

NOTE: return type is not considered. only the method parameters should be different. here, the method to be called is decided at the compile time itself, based on the signature.

in case of overriding, a simple example would be of inheritance. in case of inheritance, you have a baseclass/interface and subclasses. here, the method signature (which also can have a method body), exists in base class and same method (without modifying the signature) exists in the subclass also.

interface figure -> draw()
class triangle implements figure -> draw()
class polygon implements figure -> draw()

above you can see an interface which has a method draw() and same has been implemented in triangle and polygon (you can have a base class and do extends also). since the reference of a derived class object can be assigned to a base class reference (OOP concept), you can create objects of triangle and polygon and assign it to the interface reference"


OOPS : Explain the Polymorphism principle.

OOPS : Explain the Polymorphism principle.: "prolymorphism is the concept of using single entity in many ways according to the users request in the programing structure,Multiple methods are entertained from single category is the nature of the polymorphism."