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 methods in c#?
Explain the difference between boxing and unboxing.
what is the difference between the debug class and trace class?
Explain the importance and use of each, version, culture and publickeytoken for an assembly.
How do you escape a character?
What does an indexer do?
What are Memory foot print of an exe?
Explain the concepts of cts and cls(common language specification).
What is a web service in c#?
Are c and c# the same thing?
Why do we overload constructors?
Explain about finalize method?
How do I enforce const correctness in c#?
Is null or empty in c#?
What is sorted list in c#?