You must Sign In to post a response.

different types of constructors in oops

The forum thread has not been reviewed by Editors yet. Readers are advised to use their best judgement before accessing this thread.
This thread will be reviewed shortly.
If you think this thread contain inappropriate content, please report to webmaster.
Tell me the different types of constructors in .Net and the difference between them


#40849    Author: Anusha  07 Feb 2006 Member Level: Bronze   Points : 2

Check out the following links.

#40991    Author: Sukanya    08 Feb 2006 Member Level: Gold   Points : 2

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

#57360    Author: HimaBindu Vejella    07 Jun 2006 Member Level: Gold   Points : 2

default constructor
Overloaded constructor
Static Constructor

#71831    Author: DotNetGuts (DNG)    26 Aug 2006 Member Level: Gold   Points : 2

check out my article section

DotNetGuts (DNG)

#126933    Author: Subodh kumar Prajapati    04 Jun 2007 Member Level: Gold   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    13 Feb 2009 Member Level: Gold   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

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.