Completely Free .NET word API

Forums » .NET » .NET »

different types of constructors in oops

Posted Date: 07 Feb 2006      Posted By:: Alla.Harini     Member Level: Silver  Member Rank: 0     Points: 2   Responses: 6

Tell me the different types of constructors in .Net and the difference between them


#40849    Author: Anusha      Member Level: Bronze      Member Rank: 0     Date: 07/Feb/2006   Rating: 2 out of 52 out of 5     Points: 2

Check out the following links.

#40991    Author: Sukanya       Member Level: Gold      Member Rank: 0     Date: 08/Feb/2006   Rating: 2 out of 52 out of 5     Points: 2

You will have default constructors(initialize constructors),Parameter Constructors....

#57360    Author: HimaBindu Vejella      Member Level: Gold      Member Rank: 0     Date: 07/Jun/2006   Rating: 2 out of 52 out of 5     Points: 2

default constructor
Overloaded constructor
Static Constructor

#71831    Author: DotNetGuts (DNG)      Member Level: Gold      Member Rank: 0     Date: 26/Aug/2006   Rating: 2 out of 52 out of 5     Points: 2

check out my article section

DotNetGuts (DNG)

#126933    Author: Subodh kumar Prajapati      Member Level: Gold      Member Rank: 0     Date: 04/Jun/2007   Rating: 2 out of 52 out of 5     Points: 2

There are :

Default constructor :- There is no parameters.
Parameterised constructor. :- they have single or more then one paramertised constructor.

#347031    Author: Mrs. Meetu Choudhary Nanda      Member Level: Gold      Member Rank: 0     Date: 13/Feb/2009   Rating: 2 out of 52 out of 5     Points: 5

A procedure or function or method that is used for creating and initializing objects. In any language, constructor is called after the object has been created and is used mainly to initialize the object's internal state i.e. there member variables. It is a special method that initializes an object when the object is created. In the class, a constructor has the same name as the class.

we have following types of constructors

1. copy constructor
2. default constructor
3. naval constructor
4. universal constructor
5. virtual constructor
6. constructor function
7. constructor brabham
8. taller del constructor

e.g. of copy constructor

class a
public int x;
public a()
public a(class z) \\ copy constructor
class b
public static void Main()
a obj1 = new a();
System.Console.WriteLine(x) ;
b obj2 = new a(obj1);
System.Console.WriteLine(x) ;


Thanks and Regards
Miss Meetu Choudhary (Site Coordinator)
Go Green Save Green

Post Reply     

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.

  • Return to Discussion Forum
  • Start new thread

  • Subscribe to Subscribers
    Awards & Gifts
    Talk to Webmaster Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India