disable integer overflow checks at smaller granularity

Andrew Mercer 526 Reputation points
2021-10-03T20:50:16.627+00:00

As a rule, my VB projects have integer overflow checks enabled. I can disable them for the project by: project, properties, compile, advanced, check 'remove integer overflow checks'. Is there a way to do this for a smaller unit, eg for a VB source file? Or for a VB sub/function? Or for a VB source line/statement? FYI VS 2019 community.

Developer technologies VB
0 comments No comments
{count} votes

Accepted answer
  1. Andrew Mercer 526 Reputation points
    2021-10-05T19:05:18.147+00:00

    thanks viorel, i thought so but also thought i was missing something.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Viorel 122.5K Reputation points
    2021-10-04T05:25:39.597+00:00

    It seems that VB does not include such features. Consider making a helper assembly (Class Library project) and functions (in VB) that perform the unchecked calculations.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.