Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Why can I not implement singleton design pattern using a static variable. if not then what are the disadvantages of it?

user-image
Question ajoutée par Rasik Bihari , Technical Lead , Grapecity
Date de publication: 2013/09/19
Narendra Kumar Mallik
par Narendra Kumar Mallik , Software Engineer , Microsoft R & D India

If you create a static class instead of singleton class then you cannot pass the object of the class as  a function parameter. 

static class contains only static members but singleton class can contain every type of member.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?