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

What is the diff between vb mdi form and .net mdi form?

0 Answers  


how to deploy vb.net with key and evaluation time? any one can help me?

0 Answers   TSYS,


Which is the base class for all the classes in .net framework?

0 Answers  


Which dll is used for microsoft .net run time?

0 Answers  


What are the differences between c# and visual basic.net?

0 Answers  






Explain cls?

0 Answers  


How can I extract the formated word(bold,italic,underline,font,color etc) from the msword file.?

0 Answers  


I want to sample Hotel management project in vb.net because still now i am doing that project for small hotel....so please send me my email id is jmuthu_pearls@yahoo.com...

4 Answers   Sapphire Comfort Hotel, TATA,


What is static member?

0 Answers  


Explain redim keyword?

0 Answers  


Describe about visual basic.net?

0 Answers  


what are Fixed memory leaks and threads locking problems.

1 Answers  


Categories