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 an inheritance ?Give an example in which inheritance is used?
What is the difference between list and arraylist c#?
Can we inherit private members of class in c#?
What do you mean by the delegate in c#?
Explain about generics in c#.net?
Give examples for reference types?
If the original method is not static you can declare an override method to be static or not?
What is an escape sequence? Name some string escape sequences in c#.
What are the generation of Garbage Collection in C# .NET ?
What is the use of oops in c#?
What is concrete method in c#?
What is parameterized constructor?
When can a derived class override a base class member?
If multiple interfaces are inherited and they have conflicting method names; What will happen ?
What is use of list in c#?