Giter Site home page Giter Site logo

About ++ or -- operator about csharptovb HOT 3 OPEN

Whismeril avatar Whismeril commented on July 23, 2024
About ++ or -- operator

from csharptovb.

Comments (3)

paul1956 avatar paul1956 commented on July 23, 2024

@Whismeril Multiline conversions from single line is complex for translator especially if it is in a loop. In SDK style VB projects System is always included. I could use Math.Min(i, Interlocked.Increment(i)), and I might do some testing with it but I also do decrements. It you want to look at the code and do a PR I will review.

from csharptovb.

paul1956 avatar paul1956 commented on July 23, 2024

@Whismeril think about DoSomethingWithI(i++, i--,..); There are way too many places with multiple statements don't work and may not even be possible.

from csharptovb.

Whismeril avatar Whismeril commented on July 23, 2024

I understand the difficulty to translate one line into two, especially for a loop.
And (i++, i--,..); is an unstoppable argument, I didn't thought about it.

I only code in VB.Net in order to try helping beginners in forums.
I used to says them to search in C# too and convert code.
So when I’ve found you project, couple of days ago, I wanted the test it.
It’s very good, and your reactivity with my issues is to your credit.

But when compiling Visual Studio returns « import missing import » to the line DoSomethingWithI(Math.Min(Interlocked.Increment(i), i - 1)) my first reaction wasn’t looking for the messing assembly, but wondering was is this strange way of coding.
So I suppose beginner could be lost by compiling error in this strange line.
If converter could add Import System.Threading or at least convert like this DoSomethingWithI(Math.Min(System.Threading.Interlocked.Increment(i), i - 1)) no error occurs and beginner could have reflexion on a working line, if he see it.

I tested this case in few online converters, they do the same conversion

from csharptovb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.