Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6033657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:30:54+00:00 2026-05-23T05:30:54+00:00

I am fairly new to vb.net and came across this issue while converting a

  • 0

I am fairly new to vb.net and came across this issue while converting a for loop in C# to VB.net
I realized that the increment operators are not available in vb.net (++ and –)
whereas i was able it do something like cnt +=1

I researched a bit and came across Eric’s post on the same, but wasn’t really able to understand fully on it.
He mentions of In VB, a STATEMENT cannot be just an EXPRESSION. not sure how that really fits in.

I hope someone here would be able to explain why this doesn’t work in the same way as it does in C#.
(Hope this will also hold true as in why we have == in C# for comparison)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:30:55+00:00Added an answer on May 23, 2026 at 5:30 am

    I would say that the language designers simply thought that BASIC was a better baseline than C, when designing Visual BASIC. You can follow the lineage of C (and, earlier, BCPL) through C++, Java and C#.

    The VB lineage comes from the original BASIC from Dartmouth (and, earlier, Fortran) and is a different beast altogether.

    In other words, what started as the venerable BASIC:

    LET I = I + 1
    

    has probably been hacked and destroyed enough 🙂

    As per Eric’s post, i++; is indeed just an expression, one that yields i with the side effect that i is incremented after the event (similar to the non-side-effect expression i;).

    That’s because C allows these naked expressions, even things like 42; which doesn’t really do much but is perfectly valid. In other words, the following is a complete C program:

    int main (void) { 1; 2; 3; 4; 5; 6; 7; 8; 9; return 0; }
    

    All those expressions are valid but useless (except the 0 at the end of course).

    In BASIC, this was not really done, because BASIC consisted of statements (things that did something). That’s why i += 1 (a statement incrementing i) is considered okay, but i++ (an expression doing nothing which just happens to have a side effect which increments i) isn’t. You could argue that it’s just semantic hair-splitting but that’s just the way it is.

    You should be thankful for small mercies, at least you’re not having to deal with COBOL:

    ADD 1 TO DD_WS_I.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am fairly new at using the ASP.NET MVC framework and was hoping that
I have an issue with .Net reflection. The concept is fairly new to me
I am fairly new to .NET and C#, but I have a DataGridView that
I am fairly new in asp.net development, so you can say that I have
I'm confused as to the difference. Being fairly new to .Net, I know I
I'm fairly new to ASP.NET and trying to learn how things are done. I
I'm fairly new to ASP.NET MVC, and I'm having a little trouble with scripts...
I am fairly new to ASP.NET and I discovered repeaters recently. Some people use
I'm still fairly new to ASP.NET development so bear with me. I'm going to
I'm fairly new to C# and .NET - I'm trying to get conversion to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.