Þessi vafri er ekki lengur studdur.
Uppfærðu í Microsoft Edge til að nýta þér nýjustu eiginleika, öryggisuppfærslur og tæknilega aðstoð.
A developer needs to create and throw an exception in a C# application. Which of the following descriptions is correct?
The exception type shouldn't match the intended purpose of the exception.
The exception type that they create depends on the coding issue.
The process for throwing an exception object involves using the catch keyword.
catch
When should a method throw an exception?
A method should throw an exception when the method can complete its intended purpose.
A method should throw an exception when the method can't complete its intended purpose.
A method should throw an exception when an exception type matches the intended purpose of the method.
A developer needs to create an exception object that includes a specific Message property. Which of the following statements is correct?
Message
The Message property of an exception is writable.
The Message property shouldn't explain the reason for the exception.
The Message property should explain the reason for the exception.
You must answer all questions before checking your work.
Var þessi síða gagnleg?
Þarftu hjálp með þetta efni?
Viltu prófa að nota Ask Learn til að skýra eða leiðbeina þér í gegnum þetta efni?