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

Technology CommunityCategory: OOPCan you allow a class to be inherited, but prevent a method from being overridden in C#?
VietMX Staff asked 3 years ago

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