Explain constructor.

Answers were Sorted based on User's Feedback



Explain constructor...

Answer / hafiza khan

Constructor is like a method with a same name as of ur
class name ,no return type..
It is used to initialize the memebr variables of the class..
If there is no contructor provided compiler invokes the
default constructor. the Moment there is contructor is
provided to the class it can be any either default or
parameterized the compiler stops invoking it own default
constructor

Is This Answer Correct ?    12 Yes 0 No

Explain constructor...

Answer / 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

More Dot Net General Interview Questions

Explain can the validation be done in the server side? Or this can be done only in the client side?

0 Answers  


Explain About GDI object ?

0 Answers   TISL,


Define satelite assembly?

0 Answers  


What are code contracts?

0 Answers  


Explain about .net assemblies?

0 Answers  






How to implement DataGrid in .NET?

1 Answers   InfoPro,


How do we access crystal reports in .net?

0 Answers  


What are nullable types in .NET

0 Answers   TryTechnicals Pvt Ltd,


What is the difference between reference type and value type?

0 Answers  


How to convert a .NET object into COM operabililty?

0 Answers   Petranics Solutions,


Tell us why do we use the “using” statement?

0 Answers  


How will you make .NET programs work in Linux ?

0 Answers  


Categories