Can we have private constructor in our class file. When we
are trying to create instance for the class will it create
or throw error regarding that?
Answer Posted / balamurugan
we can create private constructor.it wont throw any
execption..but we cant create object for that class
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What are the Types of assemblies that can be created in dotnet
What is the difference between protected and private?
what are the differences between a class and structure
What's the difference between system.string and system.text.stringbuilder classes?
Can we declare class as protected?
Is arraylist type safe in c#?
How do you serialize an object?
How to rotate an Image in C#?
What are the main reasons to use c# language?
What's the implicit name of the parameter that gets passed into the set method/property of a class?
What does get set mean in c#?
What is difference between dictionary and list in c#?
what is a constructor? What is a destructor?
How does return work in c#?
Can a sealed class be used as a base class?