ITeye博客

C# 单例模式

冷寒冰 · 2013-11-06 16:43 · Markdown

public class MySigleton { private static MySigleton instance;

private MySigleton() { }

public static MySigleton InstanceMySigleton
{
    get
    {
        if (instance == null)
        {
            instance = new MySigleton();
        }
        return instance;
    }
 }

}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。