public class MyStorage
{
private static MyStorage instance;
public static MyStorage Instance
{
get {
if (instance == null)
instance = new MyStorage();
return instance;
}
}
private MyStorage()
{
// do stuff
InitStuff();
bool result;
_overwrite = bool.TryParse( ConfigurationManager.AppSettings["Overwrite"], out result) ? result : false;
}
...
}
No comments:
Post a Comment