23.1 Causes of exceptions

来源:互联网 发布:biz后缀域名是哪里的 编辑:程序博客网 时间:2024/05/15 06:52
Exception can be thrown in two different ways.
? A throw statement (§15.9.5) throws an exception immediately and
unconditionally. Control never
reaches the statement immediately following the throw.
? Certain exceptional conditions that arise during the processing of C#
statements and expression cause an
exception in certain circumstances when the operation cannot be completed
normally. [Example: For
example, an integer division operation (§14.7.2) throws a
System.DivideByZeroException if the
denominator is zero. end example] See §23.4 for a list of the various
exceptions that can occur in this
way. 
 
原创粉丝点击