You must Sign In to post a response.
  • Category: .NET

    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
    Check out the following links.

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

  • #57360
    default constructor
    Overloaded constructor
    Static Constructor

  • #71831
    check out my article section

    DotNetGuts (DNG)

  • #126933
    There are :

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

  • #347031
    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.