ExceptionRegionEncoder.Add 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
添加异常子句。
public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder Add(System.Reflection.Metadata.ExceptionRegionKind kind, int tryOffset, int tryLength, int handlerOffset, int handlerLength, System.Reflection.Metadata.EntityHandle catchType = default, int filterOffset = 0);
member this.Add : System.Reflection.Metadata.ExceptionRegionKind * int * int * int * int * System.Reflection.Metadata.EntityHandle * int -> System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder
Public Function Add (kind As ExceptionRegionKind, tryOffset As Integer, tryLength As Integer, handlerOffset As Integer, handlerLength As Integer, Optional catchType As EntityHandle = Nothing, Optional filterOffset As Integer = 0) As ExceptionRegionEncoder
参数
- kind
- ExceptionRegionKind
子句类型。
- tryOffset
- Int32
请尝试块开始偏移量。
- tryLength
- Int32
请尝试块长度。
- handlerOffset
- Int32
处理程序启动偏移量。
- handlerLength
- Int32
处理程序长度。
- catchType
- EntityHandle
TypeDefinitionHandle或者TypeSpecificationHandle,TypeReferenceHandle或者,如果kind不是Catch,则为 nil。
返回
下一个子句的编码器。
例外
catchType 无效。
kind 具有无效值。
-或-
tryOffset、 tryLength、 handlerOffset或 handlerLength 范围不足。
方法正文未声明为具有异常区域。