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
Write the role of new keyword?
How do you call a stored procedure in Visual Basic?
Tell me which namespace are used for accessing the data?
Name and explain some of the exclusive features which are present in vb?
Explain the use of serialization and deserialization?
What is the purpose of objects present in asp.net?
I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com
how many server control present in .net
Explain the difference between web.config and machine.config and where it will be ?
How many classes a dll can contain?
What are jagged arrarys ?
What is the significance of delegates. Where should they be used?
Explain public assembly?
What is the difference between convert.tostring and i.tostring method?
What is the class that allows an element to be accessed using unique key?