Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Rasik Bihari , Technical Lead , Grapecity
Date Posted: 2013/09/19
Narendra Kumar Mallik
by 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