ReSharper 2023.2 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: 08 March 2021