Instantiation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhishekphukan
    New Member
    • Jul 2014
    • 34

    #1

    Instantiation

    What is mean by instantiating a class..can someone plz expalin with proper e.g..
    Thank you.
  • horace1
    Recognized Expert Top Contributor
    • Nov 2006
    • 1510

    #2
    it is where you create an object
    have a look at
    http://msdn.microsoft.com/en-gb/libr...tiatingClasses

    Comment

    • abhishekphukan
      New Member
      • Jul 2014
      • 34

      #3
      Thank you..helped a lot..:)

      Comment

      • abhishekphukan
        New Member
        • Jul 2014
        • 34

        #4
        In other word its mean creating an object..right?

        Comment

        • horace1
          Recognized Expert Top Contributor
          • Nov 2006
          • 1510

          #5
          yes, also called creating a class instance
          have a look at constructors
          http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx

          Comment

          • abhishekphukan
            New Member
            • Jul 2014
            • 34

            #6
            Okay now i understand...co nstructor is immediately invoked whenever a memory for an obeject is allocated or created..am i right?
            And it has the same name as the class..:)

            Comment

            • abhishekphukan
              New Member
              • Jul 2014
              • 34

              #7
              Thank you for clearing my doubts..:)

              Comment

              • abhishekphukan
                New Member
                • Jul 2014
                • 34

                #8
                keep helping......:)

                Comment

                • horace1
                  Recognized Expert Top Contributor
                  • Nov 2006
                  • 1510

                  #9
                  The constructor is the method (same name as the class) called when an object is created to initialize the object

                  Comment

                  Working...