Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. is Constructor

is Constructor

Scheduled Pinned Locked Moved C#
csharp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 781610
    wrote on last edited by
    #1

    hai guys :) i'm a newbie to C#. My doubt is is 'InitializeComponent()' is somewhat similar to a constructor. Is there any special features with 'InitializeComponent()'. Could anyone share it with me plz. Thanks in advance Long Live :rose:

    C L 2 Replies Last reply
    0
    • M Member 781610

      hai guys :) i'm a newbie to C#. My doubt is is 'InitializeComponent()' is somewhat similar to a constructor. Is there any special features with 'InitializeComponent()'. Could anyone share it with me plz. Thanks in advance Long Live :rose:

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Sreenivasan Palaniappan wrote: My doubt is is 'InitializeComponent()' is somewhat similar to a constructor. How do you mean ? This method is inserted by the IDE, and called to set all the properties that you set up in the forms designer. As such, you should never mess with the code here, your changes will disappear. as such, it's also a form of construction activity, I guess. But you should add any code of your own in the spot just below the call that is commented as being the right spot to do so. Christian Graus - Microsoft MVP - C++

      1 Reply Last reply
      0
      • M Member 781610

        hai guys :) i'm a newbie to C#. My doubt is is 'InitializeComponent()' is somewhat similar to a constructor. Is there any special features with 'InitializeComponent()'. Could anyone share it with me plz. Thanks in advance Long Live :rose:

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        No ! 'InitializeComponent()' is a common function that run in the form constructor. But in VS.NET IDE this a protected area of code !! If you try to change any line of code in this function IDE will reproduce the original codes at project rebuilds. In fact this is a scope that IDE put the design time initialization of controls and components there. [ _ Always there is another way _ ]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups