ふらっとC#,C♯,C#(初心者用) Part81
■ このスレッドは過去ログ倉庫に格納されています
0263デフォルトの名無しさん
2011/11/23(水) 19:58:04.76{
#region Field
private static volatile Kanojo _instance;
private static object syncRoot = new Object();
#endregion
#region Constructor
private Kanojo() {}
#endregion
#region SingletonInstanceProperty
public static Kanojo Instance
{
get
{
if (_instance == null)
{
lock (syncRoot)
{
if (_instance == null)
_instance = new Kanojo();
}
}
return _instance;
}
}
#endregion
}
■ このスレッドは過去ログ倉庫に格納されています