L. P. with Microsoft C# - Level 4-Quiz-1

  1. You should  use Exceptions to handle any error or logical violation.
  2. To throw an exception means Raise an exception.
  3. All exceptions derive from class System.Exception.
  4. The ToString method Creates a string from the exception name.
  5. Try and Catch type of code  you use when a section of code may throw an exception.
  6. You have a Try and Catch block, but you want some code to be run whether an exception is raised or not. You should Place it in a Finally block with this code.
  7. You Use a Catch block to avoid displaying an entire exception in the user's console.
  8. You want the Catch block of your code to respond to specific exceptions. You Write a catch block for each exception to do this.
  9. a catch block for System.Exception should be placed At the last catch block.
  10. The most specific catch first is the general rule for the ordering of catch blocks.
  11. Anytime the application does not throw them the way you want  you should think about throwing a standard exception.
  12. An exception will not be thrown automatically every time there is an error or logic problem.
  13. the Constructor for an exception should be made By context.
  14. You can Create a custom exception if there is no exception that covers a problem that exists only for the purposes of the application, such as a business rule.
  15. How do you create a custom exception?
    Create an exception class.
  16. How do you throw a custom exception?
    The same as other exceptions.
Permalink | Comments (0) | Hits: 1143 | Time: 21:56:48
Learning Programming with Microsoft C# - Level 4-1.6
Learning Programming with Microsoft C# - Level 4-2.1
All Comments

 No Data Now...

Post Your Comment
^ ^

Top