WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR
MULTIPLE INHERITANCE)

Answer Posted / matt s

An interface definition specifies the 'intent' of a public
interface without forcing a base implementation. It's more
used (in favour of base or abstract classes) in cases where
the interface defines some common 'high level'
characteristics or concepts for completely different
implementations - e.g:

A 'dog' interface may be specified with common methods such
as 'scratch' and 'bark', but each type of dog's
implementation of those would be completely different.
It's still a useful design feature however as it recognises
there are similarities at the higher 'behaviour' level.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c# commonly used for?

642


What is ioc containers c#?

650


Can you pass value types by reference to a method?

703


Does unity require coding?

736


What are the uses of delegates in c#?

786


What do you mean by winforms in c#?

684


What are the desktop applications?

642


What is the file extension for c#?

700


what is virtual method in c#?

910


What is type keyword in c#?

698


What is a console file?

701


Are c# tuples immutable?

679


How do you serialize an object?

704


What is the difference between c and c sharp?

710


Why do we use generics in c#?

736