You are developing code for a class named Account. The Account class includes the following
method:
You need to ensure that overflow exceptions are thrown when there is an error.
Which type of block should you use?
A.
checked
B.
try
C.
using
D.
unchecked
C# statements can execute in either checked or unchecked context. In a checked context, arithmetic overflow raises an exception. In an unchecked context, arithmetic overflow is ignored and the result is truncated.
A
A jak Anal
OverflowException
Thrown when an arithmetic operation overflows in a checked context.
best explanation:
Pete says:
December 8, 2016 at 5:58 pm
C# statements can execute in either checked or unchecked context. In a checked context, arithmetic overflow raises an exception. In an unchecked context, arithmetic overflow is ignored and the result is truncated.