OpCodes.Ldsfld 字段

定义

将静态字段的值推送到计算堆栈上。Pushes the value of a static field onto the evaluation stack.

public: static initonly System::Reflection::Emit::OpCode Ldsfld;
public static readonly System.Reflection.Emit.OpCode Ldsfld;
 staticval mutable Ldsfld : System.Reflection.Emit.OpCode
Public Shared ReadOnly Ldsfld As OpCode 

字段值

注解

下表列出了指令的十六进制和 Microsoft 中间语言(MSIL)程序集格式以及简短的参考摘要:The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary:

格式Format 程序集格式Assembly Format 说明Description
7E < T >7E < T > ldsfld fieldldsfld field 将 @no__t 值推送到堆栈上。Push the value of field on the stack.

堆栈转换行为顺序如下:The stack transitional behavior, in sequential order, is:

  1. 将特定字段的值推送到堆栈上。The value of the specific field is pushed onto the stack.

@No__t-0 指令将静态(在类的所有实例中共享)字段的值推送到堆栈上。The ldsfld instruction pushes the value of a static (shared among all instances of a class) field on the stack. 返回类型是与传递的元数据标记相关联 fieldThe return type is that associated with the passed metadata token field.

@No__t-0 指令可以具有 @no__t 1 前缀。The ldsfld instruction can have a Volatile prefix.

以下 @no__t 0 方法重载可以使用 @no__t 操作码:The following Emit method overload can use the ldsfld opcode:

  • ILGenerator (OpCode,FieldInfo)ILGenerator.Emit(OpCode, FieldInfo)

适用于