OpCodes 클래스

정의

ILGenerator 같은 Emit(OpCode) 클래스 멤버를 사용한 내보내기 작업에 사용되는 MSIL(Microsoft Intermediate Language) 명령의 필드 표현을 제공합니다.

public ref class OpCodes
public class OpCodes
[System.Runtime.InteropServices.ComVisible(true)]
public class OpCodes
type OpCodes = class
[<System.Runtime.InteropServices.ComVisible(true)>]
type OpCodes = class
Public Class OpCodes
상속
OpCodes
특성

예제

다음 예제에서는 동적 메서드를 생성 ILGenerator 하여 으로 내보내 OpCodesMethodBuilder방법을 보여 줍니다.

using namespace System;
using namespace System::Threading;
using namespace System::Reflection;
using namespace System::Reflection::Emit;
Type^ CreateDynamicType()
{
   array<Type^>^ctorParams = {int::typeid,int::typeid};
   AppDomain^ myDomain = Thread::GetDomain();
   AssemblyName^ myAsmName = gcnew AssemblyName;
   myAsmName->Name = "MyDynamicAssembly";
   AssemblyBuilder^ myAsmBuilder = myDomain->DefineDynamicAssembly( myAsmName, AssemblyBuilderAccess::Run );
   ModuleBuilder^ pointModule = myAsmBuilder->DefineDynamicModule( "PointModule", "Point.dll" );
   TypeBuilder^ pointTypeBld = pointModule->DefineType( "Point", TypeAttributes::Public );
   FieldBuilder^ xField = pointTypeBld->DefineField( "x", int::typeid, FieldAttributes::Public );
   FieldBuilder^ yField = pointTypeBld->DefineField( "y", int::typeid, FieldAttributes::Public );
   Type^ objType = Type::GetType( "System.Object" );
   ConstructorInfo^ objCtor = objType->GetConstructor( gcnew array<Type^>(0) );
   ConstructorBuilder^ pointCtor = pointTypeBld->DefineConstructor( MethodAttributes::Public, CallingConventions::Standard, ctorParams );
   ILGenerator^ ctorIL = pointCtor->GetILGenerator();
   
   // First, you build the constructor.
   ctorIL->Emit( OpCodes::Ldarg_0 );
   ctorIL->Emit( OpCodes::Call, objCtor );
   ctorIL->Emit( OpCodes::Ldarg_0 );
   ctorIL->Emit( OpCodes::Ldarg_1 );
   ctorIL->Emit( OpCodes::Stfld, xField );
   ctorIL->Emit( OpCodes::Ldarg_0 );
   ctorIL->Emit( OpCodes::Ldarg_2 );
   ctorIL->Emit( OpCodes::Stfld, yField );
   ctorIL->Emit( OpCodes::Ret );
   
   //  Now, you'll build a method to output some information on the
   // inside your dynamic class. This method will have the following
   // definition in C#:
   //  public void WritePoint()
   MethodBuilder^ writeStrMthd = pointTypeBld->DefineMethod( "WritePoint", MethodAttributes::Public, void::typeid, nullptr );
   ILGenerator^ writeStrIL = writeStrMthd->GetILGenerator();
   
   // The below ILGenerator created demonstrates a few ways to create
   // String* output through STDIN.
   // ILGenerator::EmitWriteLine(String*) will generate a ldstr and a
   // call to WriteLine for you.
   writeStrIL->EmitWriteLine( "The value of this current instance is:" );
   
   // Here, you will do the hard work yourself. First, you need to create
   // the String* we will be passing and obtain the correct WriteLine overload
   // for said String*. In the below case, you are substituting in two values,
   // so the chosen overload is Console::WriteLine(String*, Object*, Object*).
   String^ inStr = "( {0}, {1})";
   array<Type^>^wlParams = {String::typeid,Object::typeid,Object::typeid};
   
   // We need the MethodInfo to pass into EmitCall later.
   MethodInfo^ writeLineMI = Console::typeid->GetMethod( "WriteLine", wlParams );
   
   // Push the String* with the substitutions onto the stack.
   // This is the first argument for WriteLine - the String* one.
   writeStrIL->Emit( OpCodes::Ldstr, inStr );
   
   // Since the second argument is an Object*, and it corresponds to
   // to the substitution for the value of our integer field, you
   // need to box that field to an Object*. First, push a reference
   // to the current instance, and then push the value stored in
   // field 'x'. We need the reference to the current instance (stored
   // in local argument index 0) so Ldfld can load from the correct
   // instance (this one).
   writeStrIL->Emit( OpCodes::Ldarg_0 );
   writeStrIL->Emit( OpCodes::Ldfld, xField );
   
   // Now, we execute the box opcode, which pops the value of field 'x',
   // returning a reference to the integer value boxed as an Object*.
   writeStrIL->Emit( OpCodes::Box, int::typeid );
   
   // Atop the stack, you'll find our String* inStr, followed by a reference
   // to the boxed value of 'x'. Now, you need to likewise box field 'y'.
   writeStrIL->Emit( OpCodes::Ldarg_0 );
   writeStrIL->Emit( OpCodes::Ldfld, yField );
   writeStrIL->Emit( OpCodes::Box, int::typeid );
   
   // Now, you have all of the arguments for your call to
   // Console::WriteLine(String*, Object*, Object*) atop the stack:
   // the String* InStr, a reference to the boxed value of 'x', and
   // a reference to the boxed value of 'y'.
   // Call Console::WriteLine(String*, Object*, Object*) with EmitCall.
   writeStrIL->EmitCall( OpCodes::Call, writeLineMI, nullptr );
   
   // Lastly, EmitWriteLine can also output the value of a field
   // using the overload EmitWriteLine(FieldInfo).
   writeStrIL->EmitWriteLine( "The value of 'x' is:" );
   writeStrIL->EmitWriteLine( xField );
   writeStrIL->EmitWriteLine( "The value of 'y' is:" );
   writeStrIL->EmitWriteLine( yField );
   
   // Since we return no value (void), the ret opcode will not
   // return the top stack value.
   writeStrIL->Emit( OpCodes::Ret );
   return pointTypeBld->CreateType();
}

int main()
{
   array<Object^>^ctorParams = gcnew array<Object^>(2);
   Console::Write( "Enter a integer value for X: " );
   String^ myX = Console::ReadLine();
   Console::Write( "Enter a integer value for Y: " );
   String^ myY = Console::ReadLine();
   Console::WriteLine( "---" );
   ctorParams[ 0 ] = Convert::ToInt32( myX );
   ctorParams[ 1 ] = Convert::ToInt32( myY );
   Type^ ptType = CreateDynamicType();
   Object^ ptInstance = Activator::CreateInstance( ptType, ctorParams );
   ptType->InvokeMember( "WritePoint", BindingFlags::InvokeMethod, nullptr, ptInstance, gcnew array<Object^>(0) );
}

using System;
using System.Threading;
using System.Reflection;
using System.Reflection.Emit;

class EmitWriteLineDemo {

   public static Type CreateDynamicType() {
       Type[] ctorParams = new Type[] {typeof(int),
                   typeof(int)};
    
       AppDomain myDomain = Thread.GetDomain();
       AssemblyName myAsmName = new AssemblyName();
       myAsmName.Name = "MyDynamicAssembly";

       AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(
                      myAsmName,
                      AssemblyBuilderAccess.Run);

       ModuleBuilder pointModule = myAsmBuilder.DefineDynamicModule("PointModule",
                                    "Point.dll");

       TypeBuilder pointTypeBld = pointModule.DefineType("Point",
                                  TypeAttributes.Public);

       FieldBuilder xField = pointTypeBld.DefineField("x", typeof(int),
                                                      FieldAttributes.Public);
       FieldBuilder yField = pointTypeBld.DefineField("y", typeof(int),
                                                      FieldAttributes.Public);

       Type objType = Type.GetType("System.Object");
       ConstructorInfo objCtor = objType.GetConstructor(new Type[0]);

       ConstructorBuilder pointCtor = pointTypeBld.DefineConstructor(
                                   MethodAttributes.Public,
                                   CallingConventions.Standard,
                                   ctorParams);
       ILGenerator ctorIL = pointCtor.GetILGenerator();

       // First, you build the constructor.
       ctorIL.Emit(OpCodes.Ldarg_0);
       ctorIL.Emit(OpCodes.Call, objCtor);
       ctorIL.Emit(OpCodes.Ldarg_0);
       ctorIL.Emit(OpCodes.Ldarg_1);
       ctorIL.Emit(OpCodes.Stfld, xField);
       ctorIL.Emit(OpCodes.Ldarg_0);
       ctorIL.Emit(OpCodes.Ldarg_2);
       ctorIL.Emit(OpCodes.Stfld, yField);
       ctorIL.Emit(OpCodes.Ret);

       //  Now, you'll build a method to output some information on the
       // inside your dynamic class. This method will have the following
       // definition in C#:
    //  public void WritePoint()

       MethodBuilder writeStrMthd = pointTypeBld.DefineMethod(
                                     "WritePoint",
                             MethodAttributes.Public,
                                             typeof(void),
                                             null);

       ILGenerator writeStrIL = writeStrMthd.GetILGenerator();

       // The below ILGenerator created demonstrates a few ways to create
       // string output through STDIN.

       // ILGenerator.EmitWriteLine(string) will generate a ldstr and a
       // call to WriteLine for you.

       writeStrIL.EmitWriteLine("The value of this current instance is:");

       // Here, you will do the hard work yourself. First, you need to create
       // the string we will be passing and obtain the correct WriteLine overload
       // for said string. In the below case, you are substituting in two values,
       // so the chosen overload is Console.WriteLine(string, object, object).

       String inStr = "({0}, {1})";
       Type[] wlParams = new Type[] {typeof(string),
                     typeof(object),
                     typeof(object)};

       // We need the MethodInfo to pass into EmitCall later.

       MethodInfo writeLineMI = typeof(Console).GetMethod(
                            "WriteLine",
                        wlParams);

       // Push the string with the substitutions onto the stack.
       // This is the first argument for WriteLine - the string one.

       writeStrIL.Emit(OpCodes.Ldstr, inStr);

       // Since the second argument is an object, and it corresponds to
       // to the substitution for the value of our integer field, you
       // need to box that field to an object. First, push a reference
       // to the current instance, and then push the value stored in
       // field 'x'. We need the reference to the current instance (stored
       // in local argument index 0) so Ldfld can load from the correct
       // instance (this one).

       writeStrIL.Emit(OpCodes.Ldarg_0);
       writeStrIL.Emit(OpCodes.Ldfld, xField);

       // Now, we execute the box opcode, which pops the value of field 'x',
       // returning a reference to the integer value boxed as an object.

       writeStrIL.Emit(OpCodes.Box, typeof(int));

       // Atop the stack, you'll find our string inStr, followed by a reference
       // to the boxed value of 'x'. Now, you need to likewise box field 'y'.

       writeStrIL.Emit(OpCodes.Ldarg_0);
       writeStrIL.Emit(OpCodes.Ldfld, yField);
       writeStrIL.Emit(OpCodes.Box, typeof(int));

       // Now, you have all of the arguments for your call to
       // Console.WriteLine(string, object, object) atop the stack:
       // the string InStr, a reference to the boxed value of 'x', and
       // a reference to the boxed value of 'y'.

       // Call Console.WriteLine(string, object, object) with EmitCall.

       writeStrIL.EmitCall(OpCodes.Call, writeLineMI, null);

       // Lastly, EmitWriteLine can also output the value of a field
       // using the overload EmitWriteLine(FieldInfo).

       writeStrIL.EmitWriteLine("The value of 'x' is:");
       writeStrIL.EmitWriteLine(xField);
       writeStrIL.EmitWriteLine("The value of 'y' is:");
       writeStrIL.EmitWriteLine(yField);

       // Since we return no value (void), the ret opcode will not
       // return the top stack value.

       writeStrIL.Emit(OpCodes.Ret);

       return pointTypeBld.CreateType();
   }

   public static void Main() {

      object[] ctorParams = new object[2];

      Console.Write("Enter a integer value for X: ");
      string myX = Console.ReadLine();
      Console.Write("Enter a integer value for Y: ");
      string myY = Console.ReadLine();

      Console.WriteLine("---");

      ctorParams[0] = Convert.ToInt32(myX);
      ctorParams[1] = Convert.ToInt32(myY);

      Type ptType = CreateDynamicType();

      object ptInstance = Activator.CreateInstance(ptType, ctorParams);
      ptType.InvokeMember("WritePoint",
              BindingFlags.InvokeMethod,
              null,
              ptInstance,
              new object[0]);
   }
}

Imports System.Threading
Imports System.Reflection
Imports System.Reflection.Emit

 _

Class EmitWriteLineDemo
   
   
   Public Shared Function CreateDynamicType() As Type

      Dim ctorParams() As Type = {GetType(Integer), GetType(Integer)}
      
      Dim myDomain As AppDomain = Thread.GetDomain()
      Dim myAsmName As New AssemblyName()
      myAsmName.Name = "MyDynamicAssembly"
      
      Dim myAsmBuilder As AssemblyBuilder = myDomain.DefineDynamicAssembly(myAsmName, AssemblyBuilderAccess.RunAndSave)
      
      Dim pointModule As ModuleBuilder = myAsmBuilder.DefineDynamicModule("PointModule", "Point.dll")
      
      Dim pointTypeBld As TypeBuilder = pointModule.DefineType("Point", _
                                   TypeAttributes.Public)
      
      Dim xField As FieldBuilder = pointTypeBld.DefineField("x", _
                                GetType(Integer), _
                                FieldAttributes.Public)
      Dim yField As FieldBuilder = pointTypeBld.DefineField("y", _
                                GetType(Integer), _
                                FieldAttributes.Public)
      
      
      Dim objType As Type = Type.GetType("System.Object")
      Dim objCtor As ConstructorInfo = objType.GetConstructor(New Type(){})
      
      Dim pointCtor As ConstructorBuilder = pointTypeBld.DefineConstructor( _
                             MethodAttributes.Public, _
                             CallingConventions.Standard, _
                             ctorParams)
      Dim ctorIL As ILGenerator = pointCtor.GetILGenerator()
      
      
      ' First, you build the constructor.

      ctorIL.Emit(OpCodes.Ldarg_0)
      ctorIL.Emit(OpCodes.Call, objCtor)
      ctorIL.Emit(OpCodes.Ldarg_0)
      ctorIL.Emit(OpCodes.Ldarg_1)
      ctorIL.Emit(OpCodes.Stfld, xField)
      ctorIL.Emit(OpCodes.Ldarg_0)
      ctorIL.Emit(OpCodes.Ldarg_2)
      ctorIL.Emit(OpCodes.Stfld, yField)
      ctorIL.Emit(OpCodes.Ret)
      
      '  Now, you'll build a method to output some information on the
      ' inside your dynamic class. This method will have the following
      ' definition in C#:
      '  Public Sub WritePoint() 

      Dim writeStrMthd As MethodBuilder = pointTypeBld.DefineMethod("WritePoint", _
                                    MethodAttributes.Public, _
                                    Nothing, Nothing)
      
      Dim writeStrIL As ILGenerator = writeStrMthd.GetILGenerator()
      
      ' The below ILGenerator created demonstrates a few ways to create
      ' string output through STDIN. 
      ' ILGenerator.EmitWriteLine(string) will generate a ldstr and a 
      ' call to WriteLine for you.

      writeStrIL.EmitWriteLine("The value of this current instance is:")
      
      ' Here, you will do the hard work yourself. First, you need to create
      ' the string we will be passing and obtain the correct WriteLine overload
      ' for said string. In the below case, you are substituting in two values,
      ' so the chosen overload is Console.WriteLine(string, object, object).

      Dim inStr As [String] = "({0}, {1})"
      Dim wlParams() As Type = {GetType(String), GetType(Object), GetType(Object)}
      
      ' We need the MethodInfo to pass into EmitCall later.

      Dim writeLineMI As MethodInfo = GetType(Console).GetMethod("WriteLine", wlParams)
      
      ' Push the string with the substitutions onto the stack.
      ' This is the first argument for WriteLine - the string one. 

      writeStrIL.Emit(OpCodes.Ldstr, inStr)
      
      ' Since the second argument is an object, and it corresponds to
      ' to the substitution for the value of our integer field, you 
      ' need to box that field to an object. First, push a reference
      ' to the current instance, and then push the value stored in
      ' field 'x'. We need the reference to the current instance (stored
      ' in local argument index 0) so Ldfld can load from the correct
      ' instance (this one).

      writeStrIL.Emit(OpCodes.Ldarg_0)
      writeStrIL.Emit(OpCodes.Ldfld, xField)
      
      ' Now, we execute the box opcode, which pops the value of field 'x',
      ' returning a reference to the integer value boxed as an object.

      writeStrIL.Emit(OpCodes.Box, GetType(Integer))
      
      ' Atop the stack, you'll find our string inStr, followed by a reference
      ' to the boxed value of 'x'. Now, you need to likewise box field 'y'.

      writeStrIL.Emit(OpCodes.Ldarg_0)
      writeStrIL.Emit(OpCodes.Ldfld, yField)
      writeStrIL.Emit(OpCodes.Box, GetType(Integer))
      
      ' Now, you have all of the arguments for your call to
      ' Console.WriteLine(string, object, object) atop the stack:
      ' the string InStr, a reference to the boxed value of 'x', and
      ' a reference to the boxed value of 'y'.
      ' Call Console.WriteLine(string, object, object) with EmitCall.

      writeStrIL.EmitCall(OpCodes.Call, writeLineMI, Nothing)
      
      ' Lastly, EmitWriteLine can also output the value of a field
      ' using the overload EmitWriteLine(FieldInfo).

      writeStrIL.EmitWriteLine("The value of 'x' is:")
      writeStrIL.EmitWriteLine(xField)
      writeStrIL.EmitWriteLine("The value of 'y' is:")
      writeStrIL.EmitWriteLine(yField)
      
      ' Since we return no value (void), the ret opcode will not
      ' return the top stack value.

      writeStrIL.Emit(OpCodes.Ret)
      
      Return pointTypeBld.CreateType()

   End Function 'CreateDynamicType
    
   
   Public Shared Sub Main()
      
      Dim ctorParams(1) As Object
      
      Console.Write("Enter a integer value for X: ")
      Dim myX As String = Console.ReadLine()
      Console.Write("Enter a integer value for Y: ")
      Dim myY As String = Console.ReadLine()
      
      Console.WriteLine("---")
      
      ctorParams(0) = Convert.ToInt32(myX)
      ctorParams(1) = Convert.ToInt32(myY)
      
      Dim ptType As Type = CreateDynamicType()

      Dim ptInstance As Object = Activator.CreateInstance(ptType, ctorParams)

      ptType.InvokeMember("WritePoint", _
              BindingFlags.InvokeMethod, _
              Nothing, ptInstance, Nothing)

   End Sub

End Class

설명

멤버 opcode에 대한 자세한 설명은 CLI(공용 언어 인프라) 설명서, 특히 "Partition III: CIL 명령 집합" 및 "파티션 II: 메타데이터 정의 및 의미 체계"를 참조하세요. 자세한 내용은 ECMA 335 CLI(공용 언어 인프라)를 참조하세요.

필드

Add

두 개 값을 더하여 결과를 계산 스택으로 푸시합니다.

Add_Ovf

두 정수를 더하고 오버플로를 검사하여 결과를 계산 스택으로 푸시합니다.

Add_Ovf_Un

부호 없는 두 정수 값을 더하고 오버플로를 검사하여 결과를 계산 스택으로 푸시합니다.

And

두 값의 비트 AND를 계산하여 결과를 계산 스택으로 푸시합니다.

Arglist

현재 메서드의 인수 목록에 대한 관리되지 않는 포인터를 반환합니다.

Beq

두 값이 같으면 대상 명령으로 제어를 전송합니다.

Beq_S

두 값이 같으면 대상 명령(약식)으로 제어를 전송합니다.

Bge

첫째 값이 둘째 값보다 크거나 같으면 대상 명령으로 제어를 전송합니다.

Bge_S

첫째 값이 둘째 값보다 크거나 같으면 대상 명령(약식)으로 제어를 전달합니다.

Bge_Un

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 크면 대상 명령으로 제어를 전송합니다.

Bge_Un_S

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 크면 대상 명령(약식)으로 제어를 전송합니다.

Bgt

첫째 값이 둘째 값보다 크면 대상 명령으로 제어를 전송합니다.

Bgt_S

첫째 값이 둘째 값보다 크면 대상 명령(약식)으로 제어를 전송합니다.

Bgt_Un

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 크면 대상 명령으로 제어를 전송합니다.

Bgt_Un_S

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 크면 대상 명령(약식)으로 제어를 전송합니다.

Ble

첫째 값이 둘째 값보다 작거나 같으면 대상 명령으로 제어를 전송합니다.

Ble_S

첫째 값이 둘째 값보다 작거나 같으면 대상 명령(약식)으로 제어를 전송합니다.

Ble_Un

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 작거나 같으면 대상 명령으로 제어를 전송합니다.

Ble_Un_S

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 작거나 같으면 대상 명령(약식)으로 제어를 전송합니다.

Blt

첫째 값이 둘째 값보다 작으면 대상 명령으로 제어를 전송합니다.

Blt_S

첫째 값이 둘째 값보다 작으면 대상 명령(약식)으로 제어를 전송합니다.

Blt_Un

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 작으면 대상 명령으로 제어를 전송합니다.

Blt_Un_S

부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값을 비교한 결과 첫째 값이 둘째 값보다 작으면 대상 명령(약식)으로 제어를 전송합니다.

Bne_Un

두 개의 부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값이 서로 다르면 대상 명령으로 제어를 전송합니다.

Bne_Un_S

두 개의 부호 없는 정수 값 또는 순서가 지정되지 않은 부동 소수점 값이 서로 다르면 대상 명령(약식)으로 제어를 전송합니다.

Box

값 형식을 개체 참조(O 형식)로 변환합니다.

Br

조건에 상관 없이 대상 명령으로 제어를 전달합니다.

Br_S

조건에 상관 없이 대상 명령(약식)으로 제어를 전송합니다.

Break

중단점이 설정되었음을 디버거에 알리기 위해 CLI(공용 언어 인프라)에 신호를 보냅니다.

Brfalse

valuefalse, null 참조(Visual Basic에서는 Nothing) 또는 0인 경우 대상 명령으로 제어를 전달합니다.

Brfalse_S

valuefalse, null 참조 또는 0인 경우 대상 명령으로 제어를 전달합니다.

Brtrue

valuetrue이거나 null이 아니거나 0이 아닌 경우 대상 명령으로 제어를 전달합니다.

Brtrue_S

valuetrue이거나 null이 아니거나 0이 아닌 경우 대상 명령(약식)으로 제어를 전달합니다.

Call

전송된 메서드 설명자가 나타내는 메서드를 호출합니다.

Calli

호출 규칙에서 설명하는 인수를 사용하여 계산 스택에 표시된 메서드를 진입점에 대한 포인터로 호출합니다.

Callvirt

개체에서 런타임에 바인딩된 메서드를 호출하고 반환 값을 계산 스택으로 푸시합니다.

Castclass

참조로 전송된 개체를 지정된 클래스로 캐스팅하려고 합니다.

Ceq

두 값을 비교합니다. 두 값이 같으면 정수 값 1((int32)이 계산 스택으로 푸시되고, 그렇지 않으면 0(int32)이 계산 스택으로 푸시됩니다.

Cgt

두 값을 비교합니다. 첫째 값이 둘째 값보다 크면 정수 값 1((int32)이 계산 스택으로 푸시되고, 그렇지 않으면 0(int32)이 계산 스택으로 푸시됩니다.

Cgt_Un

부호가 없거나 순서가 없는 두 값을 비교합니다. 첫째 값이 둘째 값보다 크면 정수 값 1((int32)이 계산 스택으로 푸시되고, 그렇지 않으면 0(int32)이 계산 스택으로 푸시됩니다.

Ckfinite

값이 유한 값이 아니면 ArithmeticException을 throw합니다.

Clt

두 값을 비교합니다. 첫째 값이 둘째 값보다 작으면 정수 값 1((int32)이 계산 스택으로 푸시되고, 그렇지 않으면 0(int32)이 계산 스택으로 푸시됩니다.

Clt_Un

부호가 없거나 순서가 없는 value1value2를 비교합니다. value1value2보다 작으면 정수 값 1((int32)이 계산 스택으로 푸시되고, 그렇지 않으면 0(int32)이 계산 스택으로 푸시됩니다.

Constrained

가상 메서드가 호출되는 형식을 제한합니다.

Conv_I

계산 스택 맨 위에 있는 값을 native int로 변환합니다.

Conv_I1

계산 스택 맨 위에 있는 값을 int8으로 변환하여 int32로 확장합니다(채웁니다).

Conv_I2

계산 스택 맨 위에 있는 값을 int16으로 변환하여 int32로 확장합니다(채웁니다).

Conv_I4

계산 스택 맨 위에 있는 값을 int32로 변환합니다.

Conv_I8

계산 스택 맨 위에 있는 값을 int64로 변환합니다.

Conv_Ovf_I

계산 스택 맨 위에 있는 부호 있는 값을 부호 있는 native int로 확장하고, 오버플로에 대한 OverflowException 을 throw합니다.

Conv_Ovf_I_Un

계산 스택 맨 위에 있는 부호 없는 값을 부호 있는 native int로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_I1

계산 스택 맨 위에 있는 부호 있는 값을 부호 있는 int8로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_I1_Un

계산 스택 맨 위에 있는 부호 없는 값을 부호 있는 int8로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_I2

계산 스택 맨 위에 있는 부호 있는 값을 부호 있는 int16으로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_I2_Un

계산 스택 맨 위에 있는 부호 없는 값을 부호 있는 int16로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_I4

계산 스택 맨 위에 있는 부호 있는 값을 부호 있는 int32로 확장하고, 오버플로에 대한 OverflowException 을 throw합니다.

Conv_Ovf_I4_Un

계산 스택 맨 위에 있는 부호 없는 값을 부호 있는 int32로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_I8

계산 스택 맨 위에 있는 부호 있는 값을 부호 있는 int64로 확장하고, 오버플로에 대한 OverflowException 을 throw합니다.

Conv_Ovf_I8_Un

계산 스택 맨 위에 있는 부호 없는 값을 부호 있는 int64로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U

계산 스택 맨 위에 있는 부호 있는 값을 unsigned native int로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U_Un

계산 스택 맨 위에 있는 부호 없는 값을 unsigned native int로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U1

계산 스택 맨 위에 있는 부호 있는 값을 unsigned int8로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U1_Un

계산 스택 맨 위에 있는 부호 없는 값을 unsigned int8로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U2

계산 스택 맨 위에 있는 부호 있는 값을 unsigned int16로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U2_Un

계산 스택 맨 위에 있는 부호 없는 값을 unsigned int16로 변환하고 int32로 확장하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U4

계산 스택 맨 위에 있는 부호 있는 값을 unsigned int32로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U4_Un

계산 스택 맨 위에 있는 부호 없는 값을 unsigned int32로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U8

계산 스택 맨 위에 있는 부호 있는 값을 unsigned int64로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_Ovf_U8_Un

계산 스택 맨 위에 있는 부호 없는 값을 unsigned int64로 변환하고, 오버플로에 대한 OverflowException을 throw합니다.

Conv_R_Un

계산 스택 맨 위에 있는 부호 없는 정수 값을 float32로 변환합니다.

Conv_R4

계산 스택 맨 위에 있는 값을 float32로 변환합니다.

Conv_R8

계산 스택 맨 위에 있는 값을 float64로 변환합니다.

Conv_U

계산 스택 맨 위에 있는 값을 unsigned native int로 변환하고 native int로 확장합니다.

Conv_U1

계산 스택 맨 위에 있는 값을 unsigned int8로 변환하고 int32로 확장합니다.

Conv_U2

계산 스택 맨 위에 있는 값을 unsigned int16로 변환하고 int32로 확장합니다.

Conv_U4

계산 스택 맨 위에 있는 값을 unsigned int32로 변환하고 int32로 확장합니다.

Conv_U8

계산 스택 맨 위에 있는 값을 unsigned int64로 변환하고 int64로 확장합니다.

Cpblk

지정된 수의 바이트를 소스 주소에서 대상 주소로 복사합니다.

Cpobj

개체(&, 또는 native int 형식)의 주소에 있는 값 형식을 대상 개체(&, 또는 native int 형식)의 주소로 복사합니다.

Div

두 값을 나누고 결과를 부동 소수점(F 형식)이나 몫(int32 형식)으로 계산 스택에 푸시합니다.

Div_Un

두 개의 부호 없는 정수를 나누고 결과(int32)를 계산 스택으로 푸시합니다.

Dup

현재 계산 스택 맨 위에 있는 값을 복사하여 계산 스택으로 푸시합니다.

Endfilter

예외의 filter 절에서 CLI(공용 언어 인프라) 예외 처리기로 다시 제어를 전달합니다.

Endfinally

예외 블록의 fault 절이나 finally 절에서 CLI(공용 언어 인프라) 예외 처리기로 다시 제어를 전달합니다.

Initblk

특정 주소에 지정된 메모리 블록을 주어진 크기와 초기 값으로 초기화합니다.

Initobj

지정된 주소에서 값 형식의 각 필드를 null 참조 또는 적절한 기본 형식의 0으로 초기화합니다.

Isinst

개체 참조(O 형식)가 특정 클래스의 인스턴스인지 여부를 테스트합니다.

Jmp

현재 메서드를 종료하고 지정된 메서드로 점프합니다.

Ldarg

지정된 인덱스 값이 참조하는 인수를 스택으로 로드합니다.

Ldarg_0

인덱스 0에 있는 인수를 계산 스택으로 로드합니다.

Ldarg_1

인덱스 1에 있는 인수를 계산 스택으로 로드합니다.

Ldarg_2

인덱스 2에 있는 인수를 계산 스택으로 로드합니다.

Ldarg_3

인덱스 3에 있는 인수를 계산 스택으로 로드합니다.

Ldarg_S

지정된 약식 인덱스가 참조하는 인수를 계산 스택으로 로드합니다.

Ldarga

인수 주소를 계산 스택으로 로드합니다.

Ldarga_S

인수 주소를 계산 스택에 약식으로 로드합니다.

Ldc_I4

int32 형식의 주어진 값을 int32로 계산 스택에 푸시합니다.

Ldc_I4_0

정수 값 0을 int32로 계산 스택에 푸시합니다.

Ldc_I4_1

정수 값 1을 int32로 계산 스택에 푸시합니다.

Ldc_I4_2

정수 값 2를 int32로 계산 스택에 푸시합니다.

Ldc_I4_3

정수 값 3을 int32로 계산 스택에 푸시합니다.

Ldc_I4_4

정수 값 4를 int32로 계산 스택에 푸시합니다.

Ldc_I4_5

정수 값 5를 int32로 계산 스택에 푸시합니다.

Ldc_I4_6

정수 값 6을 int32로 계산 스택에 푸시합니다.

Ldc_I4_7

정수 값 7을 int32로 계산 스택에 푸시합니다.

Ldc_I4_8

정수 값 8을 int32로 계산 스택에 푸시합니다.

Ldc_I4_M1

정수 값 -1을 int32로 계산 스택에 푸시합니다.

Ldc_I4_S

주어진 int8 값을 약식인 int32로 계산 스택에 푸시합니다.

Ldc_I8

int64 형식의 주어진 값을 int64로 계산 스택에 푸시합니다.

Ldc_R4

float32 형식의 주어진 값을 F 형식(부동 소수점)으로 계산 스택에 푸시합니다.

Ldc_R8

float64 형식의 주어진 값을 F 형식(부동 소수점)으로 계산 스택에 푸시합니다.

Ldelem

지정된 배열 인덱스에 있는 요소를 이 명령에 지정된 형식으로 계산 스택 맨 위에 로드합니다.

Ldelem_I

지정된 배열 인덱스에서 native int 형식을 갖는 요소를 계산 스택 위에 native int로서 로드합니다.

Ldelem_I1

지정된 배열 인덱스의 int8 형식을 갖는 요소를 계산 스택 맨 위에 int32로 로드합니다.

Ldelem_I2

지정된 배열 인덱스의 int16 형식을 갖는 요소를 계산 스택 맨 위에 int32로 로드합니다.

Ldelem_I4

지정된 배열 인덱스의 int32 형식을 갖는 요소를 계산 스택 맨 위에 int32로 로드합니다.

Ldelem_I8

지정된 배열 인덱스의 int64 형식을 갖는 요소를 계산 스택 맨 위에 int64로 로드합니다.

Ldelem_R4

지정된 배열 인덱스에서 float32 형식을 갖는 요소를 계산 스택 맨 위에 F형식(부동 소수점)으로 로드합니다.

Ldelem_R8

지정된 배열 인덱스에서 float64 형식을 갖는 요소를 계산 스택 맨 위에 F형식(부동 소수점)으로 로드합니다.

Ldelem_Ref

지정된 배열 인덱스에서 개체 참조를 포함하는 요소를 O 형식(개체 참조)으로 계산 스택 맨 위에 로드합니다.

Ldelem_U1

지정된 배열 인덱스의 unsigned int8 형식을 갖는 요소를 계산 스택 맨 위에 int32로 로드합니다.

Ldelem_U2

지정된 배열 인덱스의 unsigned int16 형식을 갖는 요소를 계산 스택 맨 위에 int32로 로드합니다.

Ldelem_U4

지정된 배열 인덱스의 unsigned int32 형식을 갖는 요소를 계산 스택 맨 위에 int32로 로드합니다.

Ldelema

지정된 배열 인덱스에 있는 배열 요소의 주소를 & 형식(관리되는 포인터)으로 계산 스택 맨 위에 로드합니다.

Ldfld

현재 계산 스택에 참조가 있는 개체에서 필드의 값을 찾습니다.

Ldflda

현재 계산 스택에 참조가 있는 개체에서 필드의 주소를 찾습니다.

Ldftn

특정 메서드를 구현하는 네이티브 코드에 대한 관리되지 않는 포인터(native int 형식)를 계산 스택으로 푸시합니다.

Ldind_I

native int 형식의 값을 native int 형식으로 계산 스택에 간접적으로 로드합니다.

Ldind_I1

int8 형식의 값을 int32로 스택에 간접적으로 로드합니다.

Ldind_I2

int16 형식의 값을 int32로 스택에 간접적으로 로드합니다.

Ldind_I4

int32 형식의 값을 int32로 스택에 간접적으로 로드합니다.

Ldind_I8

int64 형식의 값을 int64로 스택에 간접적으로 로드합니다.

Ldind_R4

float32 형식의 값을 F 형식(부동 소수점)으로 계산 스택에 간접적으로 로드합니다.

Ldind_R8

float64 형식의 값을 F 형식(부동 소수점)으로 계산 스택에 간접적으로 로드합니다.

Ldind_Ref

개체 참조를 O 형식(개체 참조)으로 계산 스택에 간접적으로 로드합니다.

Ldind_U1

unsigned int8 형식의 값을 int32로 스택에 간접적으로 로드합니다.

Ldind_U2

unsigned int16 형식의 값을 int32로 스택에 간접적으로 로드합니다.

Ldind_U4

unsigned int32 형식의 값을 int32로 스택에 간접적으로 로드합니다.

Ldlen

0부터 시작하는 1차원 배열의 요소 수를 계산 스택으로 푸시합니다.

Ldloc

특정 인덱스에 있는 지역 변수를 계산 스택으로 로드합니다.

Ldloc_0

인덱스 0의 지역 변수를 계산 스택으로 로드합니다.

Ldloc_1

인덱스 1의 지역 변수를 계산 스택으로 로드합니다.

Ldloc_2

인덱스 2의 지역 변수를 계산 스택으로 로드합니다.

Ldloc_3

인덱스 3의 지역 변수를 계산 스택으로 로드합니다.

Ldloc_S

특정 인덱스에 있는 지역 변수를 계산 스택에 약식으로 로드합니다.

Ldloca

특정 인덱스에 있는 지역 변수의 주소를 계산 스택으로 로드합니다.

Ldloca_S

특정 인덱스에 있는 지역 변수의 주소를 계산 스택에 약식으로 로드합니다.

Ldnull

null 참조(O 형식)를 계산 스택으로 푸시합니다.

Ldobj

주소가 가리키는 값 형식 개체를 계산 스택 맨 위로 복사합니다.

Ldsfld

정적 필드의 값을 계산 스택으로 푸시합니다.

Ldsflda

정적 필드의 주소를 계산 스택으로 푸시합니다.

Ldstr

새 개체 참조를 메타데이터에 저장된 문자열 리터럴로 푸시합니다.

Ldtoken

메타데이터 토큰을 런타임 표현으로 변환하여 계산 스택으로 푸시합니다.

Ldvirtftn

지정된 개체와 관련된 특정 가상 메서드를 구현하는 네이티브 코드에 대한 관리되지 않는 포인터(native int 형식)를 계산 스택으로 푸시합니다.

Leave

조건에 관계없이 특정 대상 명령으로 제어를 전송하여 보호되는 코드 영역을 끝냅니다.

Leave_S

조건에 관계없이 대상 명령(약식)으로 제어를 전달하여 보호되는 코드 영역을 끝냅니다.

Localloc

로컬 동적 메모리 풀에서 특정 바이트 수를 할당하고 처음 할당된 바이트의 주소(임시 포인터, * 형식)를 계산 스택으로 푸시합니다.

Mkrefany

특정 형식의 인스턴스에 대한 형식화된 참조를 계산 스택으로 푸시합니다.

Mul

두 값을 곱하여 결과를 계산 스택으로 푸시합니다.

Mul_Ovf

두 정수 값을 곱하고 오버플로를 검사하여 결과를 계산 스택으로 푸시합니다.

Mul_Ovf_Un

부호 없는 두 정수 값을 곱하고 오버플로를 검사한 후 결과를 계산 스택으로 푸시합니다.

Neg

값을 음수로 만들고 결과를 계산 스택으로 푸시합니다.

Newarr

0부터 시작하고 요소가 특정 형식인 새 1차원 배열에 대한 개체 참조를 계산 스택으로 푸시합니다.

Newobj

개체 참조(O 형식)를 계산 스택으로 푸시하여 값 형식의 새 개체나 새 인스턴스를 만듭니다.

Nop

opcode가 패치되면 공간을 채웁니다. 처리 사이클이 사용되더라도 의미 있는 연산이 수행되지 않습니다.

Not

스택 맨 위에 있는 정수 값의 비트 보수를 계산하고 결과를 같은 형식으로 계산 스택에 푸시합니다.

Or

스택 맨 위에 있는 두 정수 값의 비트 보수를 계산하고 결과를 컴퓨팅 스택으로 푸시합니다.

Pop

현재 계산 스택 맨 위에 있는 값을 제거합니다.

Prefix1

이 명령은 예약되어 있습니다.

Prefix2

이 명령은 예약되어 있습니다.

Prefix3

이 명령은 예약되어 있습니다.

Prefix4

이 명령은 예약되어 있습니다.

Prefix5

이 명령은 예약되어 있습니다.

Prefix6

이 명령은 예약되어 있습니다.

Prefix7

이 명령은 예약되어 있습니다.

Prefixref

이 명령은 예약되어 있습니다.

Readonly

후속 배열 주소 연산에서 런타임에 형식 검사를 수행하지 않고 가변성이 제한된 관리되는 포인터를 반환하도록 지정합니다.

Refanytype

형식화된 참조에 포함된 형식 토큰을 가져옵니다.

Refanyval

형식화된 참조에 포함된 주소(& 형식)를 검색합니다.

Rem

두 값을 나누어 나머지를 계산 스택으로 푸시합니다.

Rem_Un

부호 없는 두 값을 나누어 나머지를 계산 스택으로 푸시합니다.

Ret

현재 메서드에서 제어를 반환하고 반환 값이 있을 경우 호출 수신자의 계산 스택에서 호출자의 계산 스택으로 푸시합니다.

Rethrow

현재 예외를 다시 throw합니다.

Shl

결과를 계산 스택으로 푸시하여 지정된 비트 수만큼 정수 값을 0에서 왼쪽으로 이동합니다.

Shr

결과를 계산 스택으로 푸시하여 부호 안에 있는 정수 값을 지정된 비트 수만큼 오른쪽으로 이동합니다.

Shr_Un

결과를 계산 스택으로 푸시하여 부호 없는 정수 값을 지정된 비트 수만큼 0에서 오른쪽으로 이동합니다.

Sizeof

주어진 값 형식의 크기(바이트)를 계산 스택으로 푸시합니다.

Starg

지정된 인덱스에 있는 인수 슬롯에 계산 스택 맨 위에 있는 값을 저장합니다.

Starg_S

계산 스택 맨 위의 값을 약식인 지정된 인덱스의 인수 슬롯에 저장합니다.

Stelem

지정된 인덱스에 있는 배열 요소를 명령에 지정된 형식을 갖는 계산 스택의 값으로 바꿉니다.

Stelem_I

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 native int 값으로 바꿉니다.

Stelem_I1

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 int8 값으로 바꿉니다.

Stelem_I2

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 int16 값으로 바꿉니다.

Stelem_I4

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 int32 값으로 바꿉니다.

Stelem_I8

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 int64 값으로 바꿉니다.

Stelem_R4

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 float32 값으로 바꿉니다.

Stelem_R8

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 float64 값으로 바꿉니다.

Stelem_Ref

주어진 인덱스에 있는 배열 요소를 계산 스택에 있는 개체 참조 값(O 형식)으로 바꿉니다.

Stfld

개체 참조나 포인터의 필드에 저장된 값을 새 값으로 바꿉니다.

Stind_I

주어진 주소에 native int 형식의 값을 저장합니다.

Stind_I1

주어진 주소에 int8 형식의 값을 저장합니다.

Stind_I2

주어진 주소에 int16 형식의 값을 저장합니다.

Stind_I4

주어진 주소에 int32 형식의 값을 저장합니다.

Stind_I8

주어진 주소에 int64 형식의 값을 저장합니다.

Stind_R4

주어진 주소에 float32 형식의 값을 저장합니다.

Stind_R8

주어진 주소에 float64 형식의 값을 저장합니다.

Stind_Ref

주어진 주소에 개체 참조 값을 저장합니다.

Stloc

평가 스택의 맨 위에서 현재 값을 팝하고 지정된 인덱스의 지역 변수 목록에 저장합니다.

Stloc_0

평가 스택의 맨 위에서 현재 값을 팝하고 인덱스 0의 지역 변수 목록에 저장합니다.

Stloc_1

평가 스택의 맨 위에서 현재 값을 팝하고 인덱스 1의 지역 변수 목록에 저장합니다.

Stloc_2

평가 스택의 맨 위에서 현재 값을 팝하고 인덱스 2의 지역 변수 목록에 저장합니다.

Stloc_3

평가 스택의 맨 위에서 현재 값을 팝하고 인덱스 3의 지역 변수 목록에 저장합니다.

Stloc_S

평가 스택의 맨 위에서 현재 값을 팝하고 로컬 변수 목록(짧은 형식)에 index 저장합니다.

Stobj

지정된 형식의 값을 계산 스택에서 주어진 메모리 주소로 복사합니다.

Stsfld

정적 필드의 값을 계산 스택에 있는 값으로 바꿉니다.

Sub

값에서 다른 값을 빼고 결과를 계산 스택으로 푸시합니다.

Sub_Ovf

정수 값에서 다른 정수 값을 빼고 오버플로를 검사하여 결과를 계산 스택으로 푸시합니다.

Sub_Ovf_Un

부호 있는 정수 값에서 다른 부호 있는 정수 값을 빼고 오버플로를 검사하여 결과를 계산 스택으로 푸시합니다.

Switch

점프 테이블을 구현합니다.

Tailcall

실제 호출 명령이 실행되기 전에 현재 메서드의 스택 프레임이 제거되도록 후위 메서드 호출 명령을 수행합니다.

Throw

현재 계산 스택에 있는 예외 개체를 throw합니다.

Unaligned

현재 계산 스택의 맨 위에 있는 주소가 바로 다음에 오는 ldind, stind, ldfld, stfld, ldobj, stobj, initblk 또는 cpblk 명령의 기본 크기에 따라 정렬될 수 없음을 나타냅니다.

Unbox

boxed로 표시되는 값 형식을 unboxed 형식으로 변환합니다.

Unbox_Any

명령에 지정된 형식의 boxed 표현을 unboxed 형식으로 변환합니다.

Volatile

현재 계산 스택 맨 위에 있는 주소가 휘발성이고, 해당 위치를 읽은 결과가 캐시되지 않으며 이 위치에 여러 번 저장할 수 있음을 지정합니다.

Xor

계산 스택 맨 위에 있는 두 값의 비트 배타적 OR를 계산하고 결과를 스택으로 푸시합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
TakesSingleByteArgument(OpCode)

주어진 opcode가 싱글바이트 인수를 사용할 경우 True나 false를 반환합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상