Explain constructor.

Answer Posted / rajkamal busi

Constuctor is a Method/Fuction

- Having Same Name of that Class(which it belongs to).
- which doesn't have any Return Type.
- and Get Executed Automatically when ever Object is
Created for that class.

Mostly Constuctor is Used for Initialization of Objects.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the 5 different access modifiers in c#?

506


How to implement singleton design pattern in c#?

467


What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?

590


Can properties be private in c#?

472


What is form feed in c#?

560






Which is faster dictionary or list?

537


What is data binding c#?

521


What is the difference between string and stringbuilder in c#?

467


What are the differences between a class and a struct?

473


What is the difference between list and array in c#?

462


Explain a MSIL ? Why is it appreciated by all developers?

582


What is difference between string and stringbuilder in c#?

459


What is difference between singleordefault and firstordefault?

477


How to declares a two-dimensional array in C#?

563


What is deferred execution in c#?

511