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

What is generic delegates in c#?

518


What is generic method in c#?

484


Can a class have more than 1 destructor?

506


Can you describe iuknown interface in short?

607


What happens when thread sleep () method is called?

492






What is iqueryable in c#?

486


What is exe file in c#?

480


What is throw in c#?

504


What is difference between singleordefault and firstordefault?

475


Can constructor be protected?

456


Which of the following API is used to hide a window?

520


What is default access modifier for class in c#?

489


Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?

522


3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close

1446


Is c# different than c++?

506