Skip to Content
Beginning C# 3.0
book

Beginning C# 3.0

by Jack Purdum
May 2008
Beginner
550 pages
13h 22m
English
Wrox
Content preview from Beginning C# 3.0

11.5. Summary

In this chapter you learned about the various types of errors and bugs that can creep into your programs. By now you have probably advanced to the point that you make relatively few syntax or semantic errors. You have moved up to the big time: logic errors. Some errors throw exceptions and you now know how to safeguard yourself against those using exception handlers. You also learned how to force an exception, which can be helpful in testing your exception handlers.

Your biggest ally in correcting program errors is the program debugger. You should know how to set breakpoints, single-step through your programs, and use the various debugging windows to watch key variables as the program executes.

Finally, I mentioned how defensive programming can ease the burden of testing and debugging a program. Writing clear, concise code makes it much easier for you or anyone else to debug your code. Always write your code as though someone else will be responsible for maintaining it.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo, John Arkontaky, Yat Siu
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
Capitalism at Risk

Capitalism at Risk

Joseph L. Bower, Herman B. Leonard, Lynn S. Paine

Publisher Resources

ISBN: 9780470261293Purchase book