JetBrains Rider
 
2024.3
Get JetBrains Rider

Code inspection: Redundant 'abstract' modifier

Last modified: 11 February 2024

Starting from C# 8.0, you can use the abstract modifier on interface members. But this modifier is optional because interface members are abstract by default — that is, you need to override them anyway in the implementing classes — unless they have a default implementation (which is also a new feature in C# 8.0).

So in most cases the abstract modifier is redundant — interface members without a body will compile to the similar bytecode. The only case when you need to use the abstract modifier on an interface member is when this member cancels the default implementation in the base interface: