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...

What is "Polymorphism" and what are Polymorphism in VB.Net?

Answer Posted / rupali

Polymorphism is ability for redefining methods for derived
classesin OOPs.
its of two types:
1.Compiletime : Method overloading
Methods with same name but diff signatures.
Example:
Public class Calculation
public overloads sub Add(x as integer,y as integer)
return x+y
End Sub

Public overloads sub Add(x along,y as long, z as long)
return x+y+z
End sub
End class

2.Runtime :Method Overriding

Two or more methods with same name,same signatures but with
different implementations.

Example:
Public class DrwingObject
Public Overridable function Draw() as String
return "i am in generic object"
End functin
End class

Public class Line inherits DrawingObject
Public overrides functin Draw() as string
return " i am line"
End Function
End class

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the assembly entry points?

965


What is different between web.config and machine.config and where it will be ?

958


Can you please explain the difference between value and reference types?

876


What is the advantage of using system.text.stringbuilder over system.string?

1070


Name the tool which can convert visual basic old version to .net compatibility version?

975


What is visual basic.net culture?

957


How to connect crystal report in vb.net ?

884


Explain strong name in .net assembly?

923


What is econo-jit?

1045


What is writeline in vb.net?

891


Allowed program to auto-correct the database when loading a presentation.

2195


i am attending to US consulate i kept my projects on vb.net ,please help me what questions will be ask on vb.net in us consulate

2292


How would you implement inheritance using vb.net?

865


What is late binding?

898


Can we use Vb.Net and C# language simultaneously in one .Net application?

951