Posts

Showing posts from September, 2017

Difference between Static Class and Singleton class

This is my first blog and as a technical person I want to start with some technical stuff. So here is something technical I have choose, that is "Difference between Static Class and Singleton class". Recently I went through with the Singleton class. Static class I already have gone through with, so I found many difference in between them. If you do the google many stuff you will be able to find on this topic but I tried to conclude them in short in my way. So let's begin with the actual differences: Singleton objects are stored in heap but Static objects stored in stack We can clone the Singleton object but we can not clone the Static object. We can implement interface with the Singleton class but we can not implement interface with the Static class. Singleton class allows all kind of methods and properties and other members whether it is public or private or internal or protected but Static class only accept static members. Static class can not have constructor ...