what is a constructor?

Answer Posted / dharmendra nonia

constructor is a special type of method that invoke when u
create a new instance of a class. Basically it is used to
initialize the member variables.Its name must be same as
the class name.It have no return type.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a console device?

484


What is meant by collections in c#?

452


What are get and set in c#?

582


Is datetime a value type in c#?

495


Explain About multi level and multiple inheritance how to achieve in .net

577






What is the function of .IsDescendent()?

580


What is expression tree in c#?

483


How many static constructors are allowed in a class?

482


How can I get the ascii code for a character in c#?

568


Will the following code compile?

558


Is string nullable c#?

504


What is visual c# net?

494


What is the boxing and unboxing in c#?

502


What are the problem with .NET generics?

557


How can I access the registry from c# code?

518