Taking advantage of the .NET framework, a singleton can be implemented as
follows:
// .NET Singleton
sealed class Singleton
{
private Singleton() {}
public static readonly Singleton Instance = new Singleton();
}
Read the article at http://msdn.microsoft.com/en-us/library/ms954629.aspx
Saturday, June 21, 2008
The Singleton and the .NET framework
Labels:
design patterns,
singleton
Wednesday, February 6, 2008
Exploring the .NET Configuration Files
It is a headache trying to post code to Blogger. After trying for most of the evening, I gave up.
I have uploaded the article and the code to Mediafire, a free file hosting site. Download the pdf file here [http://www.mediafire.com/?66ek99twzj1] and the code here [http://www.mediafire.com/?70c0h5fddtp].
If you have difficulty downloading these, leave your mail address as a comment and I'll mail them to you.
The article explores:
- the classes that represent the structure of configuration files
- the configuration hierarchy and the Configuration class
- classes used to read from/ write to the configuration file
- how to create custom sections
The code explores the concepts discussed in the article.
Your comments and opinion on the article will be greatly appreciated.
I have uploaded the article and the code to Mediafire, a free file hosting site. Download the pdf file here [http://www.mediafire.com/?66ek99twzj1] and the code here [http://www.mediafire.com/?70c0h5fddtp].
If you have difficulty downloading these, leave your mail address as a comment and I'll mail them to you.
The article explores:
- the classes that represent the structure of configuration files
- the configuration hierarchy and the Configuration class
- classes used to read from/ write to the configuration file
- how to create custom sections
The code explores the concepts discussed in the article.
Your comments and opinion on the article will be greatly appreciated.
Labels:
.NET 2.0+,
Configuration files
Thursday, January 24, 2008
Keeping up the net presence
Maintaining a presence on the net has not been easy.
I am on Orkut since June 2007. Till recently I lived with 7 scraps. My son discovered me and scrapped "hey dad....just seven scraps ...thats pretty poor...". Since then - due to greetings for the new year - I crossed 10 scraps..whew...feels like an achievement.
A sister invited me to join Shelfari. Seemed like a good idea - books are something I like. Since then I have been bombarded with mails about how inactive a member I am. A Shelfari member, Dr.M, sent across a 'lets be friends' request. Not knowing any Dr.M's, I rejected his/her hand of friendship, only to find out later that he was a one time customer.
I have been around on Blogger since October 2006. Signing up was easy.
But I have decided to make amends. Blog I shall - sounds like a new year resolution.
I am on Orkut since June 2007. Till recently I lived with 7 scraps. My son discovered me and scrapped "hey dad....just seven scraps ...thats pretty poor...". Since then - due to greetings for the new year - I crossed 10 scraps..whew...feels like an achievement.
A sister invited me to join Shelfari. Seemed like a good idea - books are something I like. Since then I have been bombarded with mails about how inactive a member I am. A Shelfari member, Dr.M, sent across a 'lets be friends' request. Not knowing any Dr.M's, I rejected his/her hand of friendship, only to find out later that he was a one time customer.
I have been around on Blogger since October 2006. Signing up was easy.
But I have decided to make amends. Blog I shall - sounds like a new year resolution.
Labels:
ramblings
Subscribe to:
Comments (Atom)










