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 does void mean unity?
How long does it take to learn c# programming?
What is the difference between abstraction and encapsulation in c#?
How many variables do you need?
Can bool be null c#?
What is xml serializer?
Classes and structs can be declared as static, is this statement true or false?
What is COM Interoperability?
What is difference between override and new in c#?
What is single dimensional array in c#?
How do I create a single-file assembly?
Can you access a hidden base class method in the derived class?
How many bytes is a long c#?
Can you use foreach iteration on arrays in c#?
Explain how can I get around scope problems in a try/catch?