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 / vijay rana

we can declare objects in csharp,
but we can not create any instance of this class ,
if we do so it will throw an exception;

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How we can create an array with non-default values?

722


What is difference between abstraction and encapsulation in c#?

747


What does type safety mean?

821


What is the base class from which all value types are derived?

722


What is expression tree with example?

658


What is a generic class?

712


What is a datacontract?

663


What is a shared assembly?

743


what is the equivalent to regsvr32 and regsvr32 /u a file in .net development?

748


What is using keyword in C#?

786


Is datetime nullable c#?

689


How does split work in c#?

665


What is object type in c#?

730


Can we inherit partial class in c#?

677


What is semaphore in c#?

698