Question: Getting used to some new code and have a question. All over it, I am seeing the following

file1.cs :

```
MyClass myInstance = MyClass.Instance();

```

...and then in the definition of MyClass there is...

MyClass.cs : 

```
public class MyClass {

   // etc. etc.

   static readonly MyClass _instance = new MyClass();

   public static MyClass Instance() {
      return _instance;
   }

   // etc. etc.

}

```

What's the reason for doing that as opposed to just in file1.cs :

```
MyClass myInstance = new MyClass();

```

?

Answer: 
Because its using single ton pattern that is the reason...

Read : [Singleton](http://www.dofactory.com/net/singleton-design-pattern) - The singleton pattern is a design pattern that is used to ensure that a class can only have one concurrent instance. Whenever additional objects of a singleton class are required, the previously created, single instance is provided.

Read : [Singleton with proper example](http://www.codeproject.com/Articles/430590/Design-Patterns-of-Creational-Design-Patterns#Singleton)
And yet another theory about the singleton... 

You use it also in situations when you would like to have a common object shared by different parts of your application. Sometimes it might be necessary that you are *forced* to turn a static class into a singleton so that you can use if for data binding (a static class cannot be bound).

Some typical singletons that live as long as the application lives can be settings, some kind of cache, a backgrou file uploader with file watcher etc. etc...