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

Explain redim keyword?

962


What is the purpose of an Assembly?

1026


What is strong typing and weak typing?

960


What is a static class?

970


What is the role of new keyword?

997


Why do we use byref keyword in vb.net?

1000


Explain namespace?

1026


Did vb6 support multi-threading ?

912


Explain the use of serialization and deserialization?

1016


What are jagged arrays ?

978


what is difference between namespace and assembly?

1028


Explain the difference between an xml "fragment" and an xml "document."

858


Explain how to store decimal data in .net?

1137


Explain about globalization?

819


What are the different variables in vb.net?

908