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...


How does VB.NET/C# achieve polymorphism?

Answers were Sorted based on User's Feedback



How does VB.NET/C# achieve polymorphism? ..

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

How does VB.NET/C# achieve polymorphism? ..

Answer / anand gopal makwa munger

1.Function overloading.
2.Operator overloading.
You can achieve by checking the Dependency Like Below.

1.Function overloading Doesn't depends on Return type it must be same.
2.Name must be same.
3.It depends on Number of parameter. Parameter must be different.
4.it depends on different datatype of parameter.
5.It depends on order of parameter.
6.it does't depends on parameter name.

Is This Answer Correct ?    3 Yes 0 No

How does VB.NET/C# achieve polymorphism? ..

Answer / raghumadhav tirunagari


Function overloading. Operator overloading.

Is This Answer Correct ?    5 Yes 3 No

How does VB.NET/C# achieve polymorphism? ..

Answer / roopesh m.k

polimorphism is the one of the oops features, allows one
object to appear in different form by changing the type.

Two types:
1- Static eg:method overloading
2- Dynamic eg:method overriding

Is This Answer Correct ?    2 Yes 1 No

How does VB.NET/C# achieve polymorphism? ..

Answer / radhakrishna

Static Polymerphism/Compiletime Polymerphism--> Function/Operator Overloading
Dynamic/Run time Polymirphism--> Function overriding

Is This Answer Correct ?    0 Yes 0 No

How does VB.NET/C# achieve polymorphism? ..

Answer / deep

Polymorphism is also achieved through interfaces. Like abstract classes, interfaces also describe the methods that a class needs to implement. The difference between abstract classes and interfaces is that abstract classes always act as a base class of the related classes in the class hierarchy. For example, consider a hierarchy-car and truck classes derived from four-wheeler class; the classes two-wheeler and four-wheeler derived from an abstract class vehicle. So, the class 'vehicle' is the base class in the class hierarchy. On the other hand dissimilar classes can implement one interface. For example, there is an interface that compares two objects. This interface can be implemented by the classes like box, person and string, which are unrelated to each other.

C# allows multiple interface inheritance. It means that a class can implement more than one interface. The methods declared in an interface are implicitly abstract. If a class implements an interface, it becomes mandatory for the class to override all the methods declared in the interface, otherwise the derived class would become abstract.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What’s the use of “GLOBAL.ASAX” file?

0 Answers  


What combination of methods are used to improve the speed of the fill() method of the DataAdapter? a) BeginFillData() and EndFillData() b) StartFillData() and EndFillData() c) BeginLoadData() and EndLoadData() d) StartLoadData() and EndLoadData()

2 Answers   Syntax Softtech, winfoware,


1.how to encrpt query string in asp.net? 2.there are 10000 records then i wnat display 5000 records one gridview and 5000 records another grid view what is the process?

0 Answers   Marlabs,


What is http post and http get?

0 Answers  


What is request and response in asp.net?

0 Answers  


Explain the difference between page.registerclientscriptblock and page.registerstartupscript?

0 Answers  


What is the importence of the INTERFACE? but not the inheritence concept?and why we r declaring the empty methods in that? we can directly implements with in the class know? Tell me the importence?

2 Answers  


What is work flow gen? how can it will work with .Net?

0 Answers   TCS,


what is view state

5 Answers   Microsoft, Siebel Systems,


WHAT IS OBJECT POOLING

2 Answers   Fidelity,


What is mvc structure? given example? How to show gridview control from business components and using class object arrays?

3 Answers  


What is http post action?

0 Answers  


Categories