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

Answer Posted / nitesh

When we want to control the object instantiation
or trying to implement singleton pattern

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write program in c# using this instructions name avinash varma ,work experiance<2,nochildren his work experiance is higher than 5 years,more than one children one children name is diwakar,number of years of work eperiance at current company is the ratio of children and work experiance is 0.21 to 0.5

1865


What are the advantages of using partial classes?

525


Is var a data type?

489


Can a static class have a constructor c#?

473


What is the difference between static and constant variables?

532






What is variable in c#?

504


What is arraylist?

531


What is an array of arrays called?

428


What is difference between code access and role based security?

498


What is the difference between new and override in c#?

541


Is a structure a class?

490


What is icomparable in c#?

514


What are the properties of string?

484


What is the use of jit ? Jit (just - in - time) is a compiler which converts msil code to

512


Difference between StackPanel and RelativePanel ?

562