Wednesday, 23 November 2016

Practical Difference between Static class and Singleton Pattern

Static Class - 

1. static class can not implement interfaces or can not drive from class , it must drive from Object,
2. static class can not passed as a method parameter
3. static class is a sealed class

Singleton Pattern-

1.  Singleton  can  implement interfaces or can drive from class.
2.  Singleton  can  passed as a method parameter
3.. its a abstract class because private constructor

No comments:

Post a Comment