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

Answer Posted / pugal

When creating a standalone project which can be
changed at will, use an interface in preference to an
abstract class; because, it offers more design flexibility.

Use an interface to design a polymorphic hierarchy
for value types.

Use an interface when an immutable contract is
really intended.

A well-designed interface defines a very specific
range of functionality. Split up interfaces that contain
unrelated functionality.

Is This Answer Correct ?    48 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do loops in c#?

662


What is trim in c#?

763


Can abstract class have constructor in c#?

688


Which is faster list or dictionary in c#?

727


What is readline library?

689


How is method overriding different from overloading?

759


What does console mean c#?

679


What is the property of a class in c#?

647


Which is the best language for desktop application?

646


What is attribute and reflection in c#?

665


Is c# code is managed or unmanaged code?

654


Why constructor is used in c#?

651


What is view state c#?

688


I wish to create a windows application to perform a similar function as that of the "Search" which is provided to look for related files and folders in the System.. What steps must i follow??

1700


What is using keyword in C#?

774