Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"Singleton C#"
No comments yet. -
1 – 0 of 0
Non thread-safe
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;
}
...
}
posted by fc at
8:28 PM
on Feb 9, 2011
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"Singleton C#"
No comments yet. -