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 is dto c#?
Explain the difference between arraylist and array and in c#?
What is the difference between dictionary and hashtable in c#?
What is a multi line comment?
What is predicate builder?
What is a cshtml file?
What are the problem with .NET generics?
Is c# a strongly-typed language?
Wcf and what is difference between wcf and web services?
What are the advantages of interface in c#?
List some of the common data providers for ado.net framework?
What is the data encapsulation?
What are sorted lists?
Is hashset ordered c#?
Can interface have virtual methods in c#?