disable integer overflow checks at smaller granularity

Andrew Mercer 441 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.

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,568 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Viorel 112.1K 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