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
Differentiate between copy and default constructor.
Is unity object oriented?
What is yield in c#?
What is datasource c#?
what is the index value of the first element in an array?
Can we inherit sealed class in c#?
What are logical operators in c#?
What are the different ways of method can be overloaded?
How to use session under class file of APP_Code folder?
What’s a strong name?
How can you prevent escaping on backslashes in C# with string definitions?
Can interface inherit class in c#?
What is event delegate in c#?
Is c# difficult to learn?
What is the default value of date?