Results 1 to 5 of 5

Thread: Paramatized Constructors in C # language

  1. #1
    Join Date
    Dec 2010
    Posts
    59

    Paramatized Constructors in C # language

    Hello My friends ,I am an IT student, I have not began my career in IT field yet , but I am looking forward to establish my career as a software developer . As far as the development is concerned I am a bit aware about that there are mainly two streams , one is for applications and software development and the other is for web development ,but I am more interested in software part rather than messing with the web development and all that concept. Today' s developers mostly follow the object oriented concept and I like a c # language the most , and I have gone through this technical forum and taken a lot of idea about these language, such as .NET framework, looping concept , Conditional statement and all that. But none o the threads include any idea about the paramatized Constructors in this language so it would be an add on benefit if you could feedback on the same. I am waiting for your response.

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    Re: Paramatized Constructors in C # language

    Yes I too think that you should not go with the Web development. I will tell you why you should not mess with web development and all that. You will have to remember a lot of tags in that , since it uses a use of languages such as HTML , XML and all that. Well I have done graduation in IT as well, if you ask me why many people prefer Web more than in JAVA when they are asked about the elective , they do this because of the marks, but if you really want to be a good programmer and want to learn a lot in development process then you should choose JAVA over Web development. you will find constructors in all the languages, they are initialized as soon as object of any class is created.

  3. #3
    Join Date
    May 2009
    Posts
    529

    Re: Paramatized Constructors in C # language

    All C# object constructors-come up with some exception of theSystem.Object constructors- comprise an calling of the parent class's constructor straight away before the execution of the beginning line of the constructor. These constructor initializers allow you to state which class and which constructor you want to invoke .

  4. #4
    Join Date
    May 2009
    Posts
    543

    Re: Paramatized Constructors in C # language

    This usually has two forms: -

    • An initializer of the form base(.) allows the present class's parent class constructor-that is, the particular constructor implied by the form of the constructor invoked to or to be invoked.
    • An initializer accepting the form this(.) allows the present class to invoke another constructor defined within itself. This is helpful when you have overloaded more than one constructor and want to ensure that a default constructor is always invoked. Overloaded functions are covered are quite difficult , but here is a small description : overloaded functions are are two or more functions a with the same name but differ in the type signature.

  5. #5
    Join Date
    May 2009
    Posts
    527

    Re: Paramatized Constructors in C # language

    If you are quite aware of the default constructor , they are similar to the class name but do not have in arguments in their round brackets . A programming language that allows the developers us to attain the objects but providing argument to the constructor method when the object are initialized . The constructor that can accept arguments are called parametrized constructors
    Example:-
    Code:
    class xyz{
    int a,n;
    public:
    abc(int x,int y); //paramererise constructor
    ................
    .................
    };
    abc::abc(int x,int y)

Similar Threads

  1. Constructors in Java help
    By cloud101 in forum Software Development
    Replies: 4
    Last Post: 18-01-2012, 05:02 PM
  2. what are constructors in C++?
    By Asis in forum Software Development
    Replies: 4
    Last Post: 29-12-2010, 08:38 AM
  3. Constructors and Destructors in PHP
    By garfield1 in forum Software Development
    Replies: 4
    Last Post: 02-03-2010, 11:01 PM
  4. Are constructors in Csharp inherited?
    By Joel5 in forum Software Development
    Replies: 3
    Last Post: 14-11-2009, 06:47 PM
  5. What are the Constructors and Destructors?
    By RupaliP in forum Software Development
    Replies: 4
    Last Post: 27-02-2009, 07:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,879,894.26438 seconds with 16 queries