JetBrains Rider 2023.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: 01 March 2024