This blog shares my journey as a software engineer, along with personal reviews and life experiences I’ve gained along the way. “I have not failed. I've just found 10,000 ways that won't work.” — Thomas Edison. If you enjoy my content, please support it by clicking on ads (free for you, big help for me!) or by buying me a coffee on Ko-fi. Thank you!
Friday, December 22, 2017
C# reminder of the day sealed
When the keyword "sealed" is applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A, but no class can inherit from class B
Code sample
class A {}
sealed class B : A {}
Source - MSDN
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment