Explain constructor.

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please explain what do the terms “boxing” and “unboxing” mean?

590


What are multicast delegates?

585


What is the difference between encrypting a password and applying a hashing?

616


Explain what is reflection in microsoft .net context?

565


What is the use com component in .net?

587






How will you load dynamic assembly? How will create assemblies at run time?

1623


What is the advantage of packaging over xcopy in .net?

596


Compare client server application with n-tier application

519


What should you do to store an object in a viewstate?

565


What is shared and repeatable inheritance?

554


Explain about the features and elements present in Visual studio.NET IDE?

627


What is the difference between web application and enterprise application?

572


How to customize the trace output?

563


What is difference between .net core and .net standard?

495


Describe the compilation process for .net code?

608