Singleton design pattern in c#

Posted by Sekar.C under C# on 4/17/2012 | Points: 10 | Views : 1106 | Status : [Member] | Replies : 6
Hi,
Singleton design pattern in c#
Regards
Sekar.c

Regards
Sekar.c



Responses

Posted by: Sabarimahesh on: 4/17/2012 [Member] Bronze | Points: 25

Up
0
Down
Simple


Practice this Code:

http://www.dofactory.com/Patterns/PatternSingleton.aspx

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sekar.C on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
Ensure a class has only one instance and provide a global point of access to it
You want to store common data that is only needed in one location, using a singleton or static class. Save state between usages and store some caches. The object must be initialized only once and shared.
This C# page compares the singleton pattern with static classes. code a singleton is a single-instance object, and they simplify complex code. Singletons have a static property that you must access to get the object reference.


Regards
Sekar.c

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/17/2012 [Member] Silver | Points: 25

Up
0
Down
Refer this link..

http://msdn.microsoft.com/en-us/library/ff650316.aspx

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/17/2012 [Member] Silver | Points: 25

Up
0
Down
See this Dotnetfunda Article...

http://www.dotnetfunda.com/articles/article69.aspx

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
If a class has single instance then it is known as singleton design pattern.

------------------------------------------------
Learn throughout life

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/17/2012 [Member] Bronze | Points: 25

Up
0
Down
Sekar.C

Wat Happn

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response