dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: increment operator

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Posts
    28

    increment operator

    hi all, is there a ++ or -- post/pre-increment operator in visual basic?

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: increment operator

    There are no increment or decrement operators in VB.NET.

  3. #3
    Join Date
    Oct 2009
    Posts
    28

    Re: increment operator

    hmm, ok

  4. #4
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: increment operator

    As stated, no...you can read a little insight as to why here and here. However, you can use the following...

    Code:
    i += 1
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Oct 2009
    Posts
    28

    Re: increment operator

    ok thanks alot, anyway, why isn't * allowed in imports like
    Code:
    imports myclass.*

  6. #6
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: increment operator

    Just import the primary.

    Code:
    imports myclass
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  7. #7
    Join Date
    Oct 2009
    Posts
    28

    Re: increment operator

    but that way i would have to refer to functions in the innerclass as innerfunction.somestuff() whereby i jus wish to refer to it as somestuff()

  8. #8
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: increment operator

    True. But, that could cause problems for duplicate methods within subclasses. I don't believe a method or workaround of this type exists in VB.NET.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  9. #9
    Join Date
    Oct 2009
    Posts
    28

    Re: increment operator

    ok thanks, i was thinking that if it had duplicate methods i could then call it innerclass.duplicatemethod since the compiler would realise its duplicate instantly

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)