Results 1 to 3 of 3

Thread: Public Sub New()..what does it meant?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    282

    Public Sub New()..what does it meant?

    Hi all, sometimes I came across so classes that have :

    Code:
    Public Sub New()
        ' Do something
    End Sub
    May i know is this same as the Class Initialize routine? Or when does it get fired?
    I'm still on the path of learning....

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Public Sub New()..what does it meant?

    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Public Sub New()..what does it meant?

    It's certainly worth following the link provided in the page dbasnett linked to. With regards to your question specifically, you should look at the link on constructors.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width