Saturday, June 11, 2011

C# interview questions :- In what scenarios do we define a constructor private ?

We define a constructor private in the following scenarios:-
• We want to restrict the client to not create objects.

• In case of singleton patterns where we want only instance of the object to be created.

Below is a simple video which explains the above concept practically.

Please click here to see more Most asked c# interview questions

No comments: