Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 847 Bytes

vi.c.4.13-instructions-that-take-a-metadata-token-as-an-argument.md

File metadata and controls

23 lines (18 loc) · 847 Bytes

VI.C.4.13 Instructions that take a metadata token as an argument

This instruction takes a metadata token as an argument. The token can reference a type, a method, or a field of a class.

<instr> ::=
<instr_tok> <typeSpec>
| <instr_tok> method <callConv> <type> <typeSpec> :: <methodName> ( <parameters> )
| <instr_tok> method <callConv> <type> <methodName> ( <parameters> )
| <instr_tok> field <type> <typeSpec> :: <id>
<instr_tok> ::= Derived from opcode.def
ldtoken

Examples:

ldtoken class [mscorlib]System.Console
ldtoken method int32 X::Fn()
ldtoken method bool GlobalFn(int32 &)
ldtoken field class X.Y Class::Field