Why do we need a singleton class?



Why do we need a singleton class?..

Answer / Yatendra Kumar Nagar

A Singleton class is useful when only one instance of the class is required throughout the entire application. This can be beneficial for managing resources (like database connections), ensuring consistency across multiple calls, and preventing the creation of unnecessary objects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

C# called c sharp why?

1 Answers  


How are delegates chosen?

1 Answers  


What is the difference between const and static read-only?

1 Answers  


int a = '3' + '4'; char n = (char)a; What will be answer of n?

4 Answers  


Tell us something about static linking and dynamic linking?

1 Answers   C DAC,


Integer at long type variable are not object.Support your answer with example.And explain the technique to convert from value type to reference type and vice-versa.

1 Answers   HCL,


How long will it take to learn c sharp?

1 Answers  


What is concrete class in c# with example?

1 Answers  


What is static classes in c#?

1 Answers  


What does it meant to say “the canonical” form of XML ?

1 Answers  


In which situation(s), the use of "Delegate" is a good idea?

1 Answers   MCN Solutions,


Is c# substring zero based?

1 Answers  


Categories