PrepAway - Latest Free Exam Questions & Answers

Which type of block should you use?

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?

PrepAway - Latest Free Exam Questions & Answers

A.
checked

B.
try

C.
using

D.
unchecked

5 Comments on “Which type of block should you use?

  1. Pete says:

    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.




    4



    0
  2. Lord Vader says:

    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.




    2



    0

Leave a Reply