JuniorJunior (1–3 yrs)C#MicrosoftAccenture
interface vs abstract class
When do you choose interface vs abstract class in C#?
Answers use simple, clear English.
Audio N/AQuick interview answer
Interfaces define capability contracts and support multiple implementation; default interface methods exist but keep them thin. Abstract classes share state/protected helpers for a family of types. Prefer interfaces for boundaries; abstract classes for true 'is-a' shared implementation.
Detailed answer
Interfaces define capability contracts and support multiple implementation; default interface methods exist but keep them thin. Abstract classes share state/protected helpers for a family of types. Prefer interfaces for boundaries; abstract classes for true 'is-a' shared implementation.
#oop#csharp