Explain constructor.

Answer Posted / megha

Constructor is a method having same name as that of a
class.It is automatically invoked when an object is
created.It is used to Initialize variables of a class.It has
no return types.
3 types of constructors are:-
1)default constructor
2)parameterised constructor
3)static constructor

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

686


What is namespace in .net?

685


Explain the difference between vb and vb.net?

675


Explain how to rename a table using sql queries?

629


What is the new three features of COM+ services, which are not there in COM (MTS)

1632






What is clr in .net?

694


What is the difference between vb.net and vc#.net?

618


What is manifest in .net?

717


What are the core differences between .NET Languages ?

1866


What is the lapsed listener problem?

823


What is .net standard?

691


If you are executing these statements in commandobject. Select * from table1; select * from table2? How you will deal result set? 42. How do you sort a dataset.

619


What is 'Common Type System' (CTS) in .NET?

758


Explain how com+ related to the dna architecture?

646


Show different types of collection in .NET?

671