Accessing Int32.MAX

If I trap an Int32 arithmetic overflow exception and want to assign the max int32 value to the result, what is the preferred way of doing that?

The compiler won’t let me use Int32.MAX.

Thanks,

Steve

Sorry. Brain fade.

All good.

What we your fix (for followers)?

The correct syntax is Int32::MAX, not Int32.MAX.

(Excuse == I’ve been writing a lot of typescript recently :blush:)

2 Likes