How does VB.NET/C# achieve polymorphism?

Answer Posted / srinivas

1. function overloading,

2. Runtime polymorphism --Using Interface reference,

EX:
interface name I ,abstract Method();
implimenting classes A,B

ref I;
objA= new A();
objB= new B();

runtime
objA=I

objA.Method();

objB=I;
objB.Method();

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which platform does Microsoft .NET use for exchanging data between applications?

776


What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?

697


Why we are using mvc instead of asp.net? : Asp.Net MVC

696


What is session and cookies in asp.net?

741


Contrast OOP and SOA. What are tenets of each ?

1942


What is web api config?

735


Where is the view state data stored in asp net?

771


Define viewstate in .net?

716


5. What three Specific Job Positions do you target from Swatz Oils GROUP U.K?

1984


Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

765


Why SessionID changes in every request in asp.net?

745


Difference between overriding and overloading?

904


What is http only cookie?

729


What is the file extension of web service?

737


What is the part of url?

713