Click here to Skip to main content
15,889,216 members
Articles / Programming Languages / C#

Custom Exceptions Without Constructor Tedium

Rate me:
Please Sign up or sign in to vote.
4.98/5 (19 votes)
9 Oct 2017CPOL7 min read 23.5K   16  
This technique makes defining custom exceptions so easy you'll never be lazy and use System.Exception.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I first learned programming on an Apple II when I was in 7th grade by reading a mountain of back issues of Byte magazine and spending every possible opportunity in the computer lab. I only got deeper into programming from there.

My first 9 adult years were in service to my country doing my other favorite thing: electronics. After that I started my software career using VB6, classic ASP and SQL Server. Shortly after .NET was introduced I switched to C# and never looked back. These days I'm focused on MVC Core and Entity Framework Core. Along the way I have dabbled in some other languages and frameworks, but I keep coming back to the Microsoft stack as my core platform because nothing else I've tried has come close to matching it for capability and tooling. There are a few excellent non-Microsoft frameworks I use to supplement my work as well, but my root is C# and SQL Server.

For me, developing software is more than just a skill: it is a craft that I am passionate about. I find great satisfaction in finding elegant and efficient ways to solve problems, both in software and in business processes.

Comments and Discussions