The article focuses on the fact that in the sealed class the Dispose method must be private , otherwise protected virtual . I quote:
This method should be
protected virtualfor non-sealedclasses andprivateforsealedclasses.
What is the benefit of such use?
In essence, a protected virtual will still not be able to be overridden for the sealed class, since heirs cannot be created. But if suddenly we want to remove sealed from the class in which we use, as advised, private , then we will have to redo the protected virtual . Why not leave in all cases protected virtual ?
virtualin asealedclass looks out of place - there should not be any explicit virtual methods there. "Suddenly"sealednot removed,sealedis an architectural solution. - ixSci