Possible Duplicate:
Purpose of final and sealed
Hi all,
When should we opt for designing a sealed class?
When should we opt for designing a singleton class?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
These are two unrelated uses of a class.
A singleton should be used when you know that you will have exactly one instance of the class during its execution.
A sealed class simply means that it cannot be subclassed (or inherited). I don’t know when it is good situation to mark a class as sealed, so I never do.