Explain constructor.

Answer Posted / kamlesh sharma

constructors are special type of member functions of class
which is used to initilized a object

1. constructors are as same name of the class
2. don't have any return type
3. don't return any value


Types
1 default constructor
2 parametrized constructor and
3 copy constructures

constructors can be overload

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define a manifest in .net?

539


What is trim in c#?

545


What is difference between dynamic and var in c#?

484


How do I port "synchronized" functions from visual j++ to c#?

490


Why do we need dependency injection in c#?

461






What is stringbuilder c#?

514


Define a strong name in .net?

544


can you allow a class to be inherited, but prevent the method from being over-ridden?

552


What can you do as a .net developer?

498


What is datasource c#?

492


Which is more efficient for loop or while loop?

471


How to sign an assembly with strong name?

581


What is form feed in c#?

568


What is ilist c#?

503


What are the 2 kinds of data type conversions in c#?

509