Web Log di Adrian Florea

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." Antoine de Saint-Exupery
posts - 440, comments - 2715, trackbacks - 3944

My Links

Archives

Post Categories

Image Galleries

.RO Blogs

.RO People

.RO Sites

Blogs

Furls

Links

vinCitori

Singleton con classi static in Visual C# Whidbey

In Visual C# Whidbey, una classe singleton:
public sealed class Singleton
{
  private Singleton(){}
  public static readonly Singleton Instance = new Singleton();
}
si potrà scrivere in modo ancora più semplice utilizzando le classi static:
public static sealed class Singleton
{
  public static readonly Singleton Instance = new Singleton();
}

Print | posted on domenica 28 marzo 2004 22:32 | Filed Under [ Pattern Dappertutto ]

Powered by:
Powered By Subtext Powered By ASP.NET