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

Suppose two interfaces have same method, so how will you implement these methods in derive class?

493


What are delegates?

806


What is c# best for?

538


Compare and contrast between the System.Array.CopyTo() and Clone()?

555


What are data types with examples?

518






When was .net linq added?

527


How to achieve polymorphism in c#?

556


How do I do implement a trace?

548


Can a static class contain non static members?

563


What is Wrapper class in dot net?

648


Is datetime value type c#?

489


What does f mean in c#?

521


Why extension method is static?

477


For methods inside the interface why can’t you specify the accessibility modifier?

559


What are tuples c#?

511