What are the differences between an interface and an abstract class in .net?
Answer / Durgesh Kumar Mishra
An interface defines a contract that a class must implement, but it doesn't provide any implementation. An abstract class can contain both method declarations (abstract methods) and implementation for those methods. An interface can also define properties, events, and indexers, while an abstract class cannot have events or indexers. Multiple classes can implement the same interface, but a class can only inherit from one abstract class.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to get the hostname or IP address of the server?
How many namespaces are in .net version 1.1?
Explain the difference between public and static modifiers?
What is concurrency? How will you avoid concurrency when dealing with dataset?
What is UDDI and how to register the web service in it?
What is .net debug & trace?
What is the difference between constants and read-only variables?
How to write an MMC snap-in for my Windows service?
What is "common language specification" (cls) in .net?
Explain code access security.
Please explain what inheritance is, and why it's important?
What's singleton activation mode in .net?