Explain constructor?

Answer Posted / satish

A constructor is a method that is used to create new
instances of a class. You can easily recognize a
constructor because it has the same name as the class and
is defined with syntax similar to that of a method
definition, but it has no return type.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is yield return in c#?

487


Who benefits from ajax?

576


What is a deadlock lock?

484


What is array and types of array in c#?

472


How many constructors can a class have c#?

462






what is the syntax to inherit from a class in c#?

540


What is difference between class and interface in c#?

448


Why should I use interface in c#?

484


What does dbml mean?

493


Structs are largely redundant in c++. Why does c# have them?

736


What is use of abstract class in c#?

485


What is the difference between static class and abstract class in c#?

454


Are cao stateful in nature?

469


Is std :: string null terminated?

482


Is c# dictionary a hash table?

475