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
How objects are stored in memory?
Why extension method is static?
Define an abstract class?
in the nunit test framework, which attribute must adorn a test class in order for it to be picked up by the nunit gui?
Why is hashset faster?
What is multithreading with .net?
What is assembly manifest?
Is string mutable in c#?
What Is The Smallest Unit Of Execution In .net?
What is the default value of date?
Can you create an instance of a static class?
Can multiple inheritance implemented in c# ?
Can you see a loop recorder?
Define an escape sequence, name few strings in escape sequence?
To allow an element to be accessed using a unique key which .NET collection class is used ?