.NET interview questions :- What is the use of private constructor ?
- We can not create a object of the class.
- We can not inherit the class.
Now the next question which the interviewer will ask , whats the use of such kind of class which can not be inherited neither instantiated.
Many times we do not want to create instances of certain classes like utility , common routine classes. Rather than calling as shown below
clsCommon common = new clsCommon(); common.CheckDate("1/1/2011");
You would like to call it as
Check my 21 important Most asked Dotnet interview questions