Ask Me
This blog contains questions generally asked in ASP.Net interviews along with their relevant answers
Thursday, April 9, 2020
Why do we have to make the GetInstance() method or Instance Property of a Singleton class Static?
Because the constructor of the singleton class is private and can't be accessed from the outside world. Therefore there is no other way for us to access the methods of this class than making it static.
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)