Difference Between Static Class and Singleton Class In C# With Example
Автор: IT Knowledge
Загружено: 2021-01-31
Просмотров: 5875
Static class is a class which we cannot create an instance or object of this class. Static class must have static variables, properties, and methods. Static class cannot follow the OOP rules. It does not implement inheritance.
Static class is not a design pattern hence it also not follow the OOP rules. Static class methods, variables, and properties has been shared among all the applications and access by the using class name then dot and follow by the method name. Static class cannot pass as a parameters in method.
Singleton class is a class which only and only one instance. Singleton class will follow the OOP rules and its a pure OOP implementation. Singleton class pass as a parameters in method. Singleton class is a design pattern which use the OOP rules and this is the feature the makes singleton class is a design pattern.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: