what is the real use of interface in c#,other than that
multiple inheritance is not possible

Answer Posted / venkatesan

Interface is a contract which declares a method inside and
gives the implementation in different classes using
polymorphism. we cannot create a object to an interface but
we can create a reference for an interface.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a class be protected in c#?

488


What is the use of flag in c#?

490


What is int16?

513


What is .net console?

535


What is thread.sleep()?

516






What is multithreading with .net?

537


Can you have an array of arrays?

504


Can you create partial delegates and enumerations?

582


What is the difference between field and property in c#?

472


What is a c# delegate?

607


Differentiate between dataset and datareader?

527


what is IComparable

556


Explain copy constructor?

663


What is the use of console application in c#?

477


What is enum in c#?

534