GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 338 of 436    Print  
Constructor is the method which is implicitly created when ever a class is instantiated. Why?

  
Total Answers and Comments: 5 Last Update: April 05, 2008     Asked by: Rohit Sharma 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 25, 2006 08:17:10   #1  
sudhagar        

RE: Constructor is the method which is implicitly crea...
Constructors are class methods that are executed when an object of a given type is created. Constructors have the same name as the class and usually initialize the data members of the new object
 
Is this answer useful? Yes | No
May 25, 2006 07:39:23   #2  
Gideon Member Since: May 2006   Contribution: 1    

RE: Constructor is the method which is implicitly crea...
because the contructor contains all the methods and properties of the particular class thus having the same name as the class name.
 
Is this answer useful? Yes | No
October 25, 2006 05:20:12   #3  
Iqbal Basha        

RE: Constructor is the method which is implicitly crea...

Purpose of Constructor is to initialize the member variables you no need to invoke constructor explicitly it execute when you create the object. Thus provide the functionality of initialization.

-BASHA G.


 
Is this answer useful? Yes | No
January 15, 2007 17:12:55   #4  
vct        

RE: Constructor is the method which is implicitly crea...
A default constructor is implicitly created to assign instance data using any assignments provided in the class definition. In this case all instances of the class start out with the same initial values
 
Is this answer useful? Yes | No
April 05, 2008 06:10:14   #5  
Vikas Yadav Member Since: April 2008   Contribution: 15    

RE: Constructor is the method which is implicitly created when ever a class is instantiated. Why?
Only default constructor is called automatically and that is to only to zeroed down the data types you have declared in your class and that is for avoiding initialization error for your class...


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape