Home »

Can you allow a class to be inherited, but prevent the method from being overridden?

Question ListCategory: C#.NETCan you allow a class to be inherited, but prevent the method from being overridden?
jully882 author asked 8 years ago
1 Answers
jamessmith05 author answered 8 years ago

Yes. Just leave the class public and make the method sealed.

Please login or Register to Submit Answer