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 are the generation of Garbage Collection in C# .NET ?

761


What is the difference between CreateObject() and GetObject()?

781


Is c# good for beginners?

676


What is cshtml?

713


How to block a class from being inherited further?

700


What does using do in c#?

704


How many kinds of elements an array can have?

680


How long can a string be c#?

687


What is data adapter in c#?

666


What do you mean by for each loop?

699


Are c# objects passed by reference?

673


Is c# easier than javascript?

720


Is array a list?

674


Are string objects mutable or immutable?

724


Is hashset serializable c#?

727