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 AutoMapper in C#?

777


What is a nested type. Give an example?

835


Does c# have a 'throws' clause?

789


What is using keyword in C#?

797


How do I create multifile assembly?

725


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

762


Why do we use delegates?

639


How do you prevent a class from being inherited?

722


What is the use of protected in c#?

705


What is difference between encapsulation and abstraction in c#?

698


what are the Disadvantages of vb

808


What is private virtual in C#?

787


Is a structure a class?

690


Is c# the same as d flat?

706


What is readline c#?

666