C# 9.0 Pocket Reference by Joseph Albahari & Ben Albahari
Author:Joseph Albahari & Ben Albahari [Joseph Albahari]
Language: eng
Format: epub
Publisher: O'Reilly Media, Inc.
Published: 2021-01-19T16:00:00+00:00
try { int x = 3, y = 0; Console.WriteLine (x / y); } catch (DivideByZeroException) { Console.Write ("y cannot be zero. "); } // Execution resumes here after exception...
Note
This is a simple example to illustrate exception handling. We could deal with this particular scenario better in practice by checking explicitly for the divisor being zero before calling Calc.
Exceptions are relatively expensive to handle, taking hundreds of clock cycles.
When an exception is thrown within a try statement, the CLR performs a test:
Does the try statement have any compatible catch blocks?
If so, execution jumps to the compatible catch block, followed by the finally block (if present), and then execution continues normally.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9947)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9822)
The Mikado Method by Ola Ellnestam Daniel Brolund(9813)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8333)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7810)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7788)
Grails in Action by Glen Smith Peter Ledbrook(7719)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7590)
Windows APT Warfare by Sheng-Hao Ma(7160)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6893)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6779)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6445)
Kotlin in Action by Dmitry Jemerov(5092)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4341)
Solidity Programming Essentials by Ritesh Modi(4170)
Functional Programming in JavaScript by Mantyla Dan(4059)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3970)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3916)
The Ultimate iOS Interview Playbook by Avi Tsadok(3883)
