As soon as a singleton pattern is understood, writing the next singleton classes in C # is a brainless exercise. I hope the framework helps you by providing an interface or base class for this. Here is how I imagine it:
public sealed class Schablone : ISingleton<Schablone>
{
}
Is there what I'm looking for?
Is there any syntactic sugar for building a singleton class - be it with an interface, class attribute, etc.?
Is it possible to write a useful and bulletproof ISingleton? Try to try?
Thank!
source
share