2005-11-25から1日間の記事一覧

Singletonパターン

C#

定石としては、 using System; public sealed class Singleton { static readonly Singleton instance = new Singleton (); Singleton () { Console.WriteLine ("Constructor."); } public static Singleton Instance { get { return instance; } } } class …