Ši naršyklė nebepalaikoma.
Atnaujinkite į „Microsoft Edge“, kad pasinaudotumėte naujausiomis funkcijomis, saugos naujinimais ir techniniu palaikymu.
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.
Ar šis puslapis buvo naudingas?
Reikia pagalbos šioje temoje?
Norite išbandyti funkciją „Ask Learn“, kad patikslintų arba paaiškintų šią temą?