Causes of Exceptions
Different situations give rise to exceptions:
Code defects, such as forgetting null checks causing
NullReferenceExceptions
or passing invalid arguments to some method that signals the defect using an ArgumentException
or variation thereof.
Runtime disasters that prevent the CLR’s execution engine from continuing execution; for example, due to insufficient memory (
OutOfMemoryException
) or a stack overflow.
Error conditions in ...
Get C# 5.0 Unleashed now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.