M_Cyjb_Reflection_ILGeneratorUtil_GetClosure_1 - CYJB/Cyjb GitHub Wiki

ILGeneratorUtil.GetClosure 方法 (ILGenerator, Object)

返回指定闭包值的索引。

Namespace: Cyjb.Reflection
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public static int GetClosure(
	this ILGenerator il,
	Object value
)

参数

 

il
Type: System.Reflection.Emit.ILGenerator
IL 指令生成器。
value
Type: System.Object
要使用的闭包值。

返回值

Type: Int32
指定闭包值的索引。

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型ILGenerator的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。

Exceptions

 

异常 条件
ArgumentNullException ilnull

参见

Reference

ILGeneratorUtil 类
GetClosure 重载
Cyjb.Reflection 命名空间

⚠️ **GitHub.com Fallback** ⚠️