What is a private constructor? where will you use it?

Answer Posted / dsr

private constructor access only that class. we can't access
in other class.we can use the private constructor in
singleton patteren.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why can't we use a static class instead of singleton?

443


What is difference between method overriding and method overloading?

515


How big is a float?

495


How do I type a whitespace character?

517


How many bytes is a char c#?

476






Can we instantiate abstract class in c#?

468


Is there regular expression (regex) support available to c# developers?

516


Why do we need interfaces in c#?

477


What's different between c# and c/c++?

526


Explain about ODP.net

797


What Is An Interface Class?

551


In which way a two-dimensional array declared in C#?

498


Which program construct must return a value?

561


What is difference between write and writeline?

461


Explain nullable types in c#?

528