Friday, 23 May 2014

How to implement singleton design pattern in C#?

In singleton pattern, a class can only have one instance and provides access point to it globally.

Eg:
[csharp]
Public sealed class Singleton
{
Private static readonly Singleton _instance = new Singleton();
}
[/csharp]

No comments:

Post a Comment

How to improve applications performance which is hosted in cloud ?

Improving the performance of an application hosted in Microsoft Azure involves a combination of optimizing your application code, leveraging...