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

Explanation:
http://sholfen.pixnet.net/blog/post/47467244-c#—checked-關鍵字
Aline提供

One Comment on “Which type of block should you use?

  1. bjotta says:

    A – You need to fill this in a checked block because it makes sure the code does not overflow. If there is no checkedblock it can overflow, depending on the compiler options.




    0



    0

Leave a Reply