C# 5.0 Pocket Reference by Joseph Albahari & Ben Albahari
Author:Joseph Albahari & Ben Albahari
Language: eng
Format: epub
ISBN: 9781449339906
Publisher: O'Reilly Media
Throwing Exceptions
Exceptions can be thrown either by the runtime or in user code. Here, Display throws a System.ArgumentNullException:
static void Display (string name) { if (name == null) throw new ArgumentNullException ("name"); Console.WriteLine (name); }
Rethrowing an exception
You can capture and rethrow an exception as follows:
try { ... } catch (Exception ex) { // Log error ... throw; // Rethrow same exception }
Rethrowing in this manner lets you log an error without swallowing it. It also lets you back out of handling an exception should circumstances turn out to be outside what you expected.
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.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12595)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9804)
The Mikado Method by Ola Ellnestam Daniel Brolund(9789)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7773)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7568)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7197)
Microservices with Go by Alexander Shuiskov(6961)
Practical Design Patterns for Java Developers by Miroslav Wengner(6875)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6820)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6427)
Angular Projects - Third Edition by Aristeidis Bampakos(6242)
The Art of Crafting User Stories by The Art of Crafting User Stories(5755)
NetSuite for Consultants - Second Edition by Peter Ries(5683)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5498)
Kotlin in Action by Dmitry Jemerov(5076)
