Actually sealed modifiers, singletons, and constructors that initialize a series of private variables are all concepts that solve different problems.
If you don't want others to access private variables then your constructor idea seems fine. If you don't want any other class to derive from your class, then the sealed modifier is fine. If you want just one instance of your class then the Singleton pattern works great.
So, the answer to your question really depends on what the problem is you're trying to solve.
Hope this helps.
Dan McMillan, Dec 03, 2010
Thanks for your explanation.
Aug 31, 2010