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

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.

0 Answers  


What is a system lock?

2 Answers   Wipro,


what are connection strings?

0 Answers   Manhattan, RTRT,


Explain boxing and unboxing in .net.

0 Answers  


Describe the Managed Execution Process

0 Answers  


Explain about Behavioral design pattern?

0 Answers  


Example from .net. Integer & struct are value types or reference types in .net?

0 Answers  


What is data type and how many types of data types are in .NET ?

0 Answers  


What is value type and refernce type in .net?

0 Answers  


i have an array of 10 objects whose values are from 1-10 randomly inserted. i have deleted one array object. tell me what is that value? write the logic of it.

2 Answers   Deloitte, Srp Khanij,


Can any object be stored in a viewstate in .net?

0 Answers  


what are design patterns in .net....?

2 Answers  


Categories