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

Answers were Sorted based on User's Feedback



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

Answer / kalpana

Polymorphism is one of the crucial features of OOP. It
means "one name, multiple forms". It is also called as
Overloading which means the use of same thing for different
purposes. Using Polymorphism we can create as many
functions we want with one function name but with different
argument list. The function performs different operations
based on the argument list in the function call. The exact
function to be invoked will be determined by checking the
type and number of arguments in the function.

Is This Answer Correct ?    15 Yes 0 No

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

Answer / 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

More VB.NET Interview Questions

Tell us how many languages are supported by .net?

0 Answers  


I'm unable to open a .hlp file using vb.net application.

1 Answers  


What are nested classes?

0 Answers  


What is a literal control?

0 Answers  


List the different types of assembly?

0 Answers  






How does you get record no from 5 to 15 from a dataset of 100 records?

3 Answers   ABC,


How to connect a service based database to vb.net forms? Do we have to create any specific database?

1 Answers  


wht is the use of console application?

3 Answers   MRB,


Explain about branching logic control in vb.net?

0 Answers  


Disadvantages of vb ?

12 Answers   Digital GlobalSoft, TCS,


Which control is an example of an object in vb net?

0 Answers  


What is the main purpose of garbage collector?

0 Answers  


Categories