Giter Site home page Giter Site logo

OverFlow Conversions about csharptovb HOT 3 CLOSED

VBAndCs avatar VBAndCs commented on August 26, 2024
OverFlow Conversions

from csharptovb.

Comments (3)

paul1956 avatar paul1956 commented on August 26, 2024

Fixed in converter 5.0.1.20. I was special casing this and I changed it to use your solution.

from csharptovb.

VBAndCs avatar VBAndCs commented on August 26, 2024

My solution will not give the same C# results with signed numeric types. It does't matter in my case because I deal with randoms.
in this sample, x will be -128

  var x = sbyte.MaxValue;
  x += 1;

This value comes from:
x - sbyte.MinValue - 1 + sbyte.MinValue

from csharptovb.

paul1956 avatar paul1956 commented on August 26, 2024

@VBAndCs I have a solution but it is long but it works with everything I have tried.
Dim aB As Object = 5
Dim Ab1 As Integer = CInt(CLng(Fix(aB)) Mod Integer.MaxValue)

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.