Skip to content

Why dotnet team prefers abstract classes over interfaces? #84120

Answered by stephentoub
dex3r asked this question in Q&A
Discussion options

You must be logged in to vote

#36617 (comment)

You can add new virtuals to a base class without concern for the diamond problem that is present for Default Interface Methods (which also aren't supported on older versions of .NET). For the core libraries, that's an issue we take seriously; for more niche interfaces that are less likely to be inherited, we've started to accept some risk there, but as interfaces become more core, we're much less likely to use DIMs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dex3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants