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 a must for multitasking

562


What is exe in c#?

493


without modifying source code if we compile again, will it be generated MSIL again?

481


How many types of polymorphism are there?

496


Why are dynamic link library used over static one?

540






Explain the difference between a namespace and assembly name in .net?

492


How do I know if executenonquery is successful c#?

443


What is inheritance in csharp?

517


Can a dictionary have duplicate keys c#?

478


What is out in c#?

512


Are c# generics the same as c++ templates?

495


How do you name a variable in c#?

498


What is difference between singleton and static class in c#?

472


Why is c# better than java?

499


What is difference between private and protected?

495