JetBrains Rider 2024.3 Help

Code inspection: Sealed member in sealed class

Consider the following snippet:

class Base { protected virtual void Change(int id) { } } sealed class Derived : Base { protected override sealed void Change(int id) { } }

Marking the Derived.Change() method as sealed is redundant because the whole class it happens to be in is marked as sealed.

Last modified: 11 February 2024