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 / saiish bhat
ya,we have private constructor.but it wont throw an exception.
but u cant create an instance of p.c.
it is not possible to inherit from that class also.
ex:
private class a()
{
}
class b : a
{ }
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What are the advantages of interface in c#?
Where static variables are stored?
Can struct have constructor c#?
Can we extend static class in c#?
how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge
Explain circular reference in c#?
What is poco c#?
When a Static Constructor is called in a Class?
How big is int16?
What is stringwriter c#?
Which namespaces are necessary to create a localized application?
What is a dynamic assembly?
What are the methods in c#?
Can you specify nested classes as partial classes?
What is delegate in c#?