1 min read

A Quick C# Question: Sealed classes

Paul Kinlan

Paul Kinlan

Lead of Chrome DevRel

If you have a sealed class are all the methods inside the sealed class also typed as sealed.

I am asking this because I have some virtual functions inside an abstract class that I would like to seal, I don't want the class to be extended so sealing the class makes sense. Therefore if I just seal the class can all the methods be considered sealed by the JIT'er or do I have to seal the methods too.

Stay in the loop.

I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.

alternate_email

Get in touch

Open to chat about Chrome or Web development.

Book a consultation