what is a constructor?

Answer Posted / ranjith

Constructor is a method which will be executed when an
object is created. It is used to Intialize the
object.constructors has the same name as the class
name.constructors will take parameters.constructors doesnot
return any value

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is strongly typed view?

685


Is c# pass by value?

675


Which property of the textbox cannot be changed at runtime?

673


Which string method is used for concatenation of two strings in c#?

698


Which is faster list or dictionary in c#?

741


How to move to a state-related codebase?

1178


Explain synchronous and asynchronous operations?

746


Is a decimal an integer?

665


Why do we need properties in c#?

651


Is as keyword in c#?

674


Why we need get set property in c#?

726


What does string intern do?

675


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

724


How do you concatenate in c#?

681


What is IL / CIL / MSIL?

880