Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specification


23 Exceptions
Paragraph 11 Exceptions in C# provide a structured, uniform, and type-safe way of handling both system level and application-level error conditions. [Note: The exception mechanism is C# is quite similar to that of C++, with a few important differences: - In C#, all exceptions must be represented by an instance of a class type derived from System.Exception. In C++, any value of any type can be used to represent an exception.
- In C#, a finally block (§15.10) can be used to write termination code that executes in both normal execution and exceptional conditions. Such code is difficult to write in C++ without duplicating code.
- In C#, system-level exceptions such as overflow, divide-by-zero, and null dereferences have well defined exception classes and are on a par with application-level error conditions. end note]
|
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

