Recommended Answers
Jump to PostHai friends what is the difference between sealed class and private constructor any way both doesnt allow inheritance? If any difference please tell me?
Let me takes a shot at this ...
A sealed class doesn't allow inheritance. That is, you can't derive from it.
A private constructor …
Jump to PostSealed classes
A sealed class cannot be used as a base class. For this reason, it also cannot be an abstract class. Sealed classes are primarily used to prevent derivation. They add another level of strictness during compile-time, improve memory usage, and trigger certain optimizations that improve run-time efficiency.
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.