Home > Interview Questions > C#.NET > How to prevent to create object and inheritance for the particular class?

How to prevent to create object and inheritance for the particular class?

by Shiva murugan   on 12/05/2011   Category: C#.NET   |  Level: Intermediate   |  Views: 1521    |  Points: 25     |  Bronze 


Create the class constructor as a PRIVATE, if class constructor is private then we can’t create object and can’t inherit the class also.


« How do you handle errors in ASP.NET application or Error handling types in ASP.NET?
» How will you do UNIT TEST for your project in .NET?
Post Question  |  Question Home

Recent Posts

User Responses


No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts