ildasm , the IL disassembler, has low-level metadata information. It installs as part of the Windows SDK when installing Visual Studio. It must be accessible from the VS command line.
When you open a managed assembly, press Ctrl + M or do a View "MetaInfo" Show! to view metadata tokens, for example:
TypeDef # 1 (02000002)
-------------------------------------------------- -----
TypDefName: ConsoleApplication1.Program (02000002)
Flags: [NotPublic] [AutoLayout] [Class] [AnsiClass] [BeforeFieldInit] (00100000)
Extends: 01000001 [TypeRef] System.Object
Method # 1 (06000001) [ENTRYPOINT]
-------------------------------------------------- -----
MethodName: Main (06000001)
...
There are also options for viewing the source metadata tables via ildasm /text /metadata=raw foo.dll :
// ================================================= =
// 25 (0x19): MethodImpl cRecs: 0 (0), cbRec: 6 (0x6), cbTable: 0 (0)
// col 0: * Class oCol: 0, cbCol: 2, TypeDef
// col 1: MethodBody oCol: 2, cbCol: 2, MethodDefOrRef
// col 2: MethodDeclaration oCol: 4, cbCol: 2, MethodDefOrRef
// ================================================= =
// 26 (0x1a): ModuleRef cRecs: 0 (0), cbRec: 2 (0x2), cbTable: 0 (0)
// col 0: Name oCol: 0, cbCol: 2, string
// ================================================= =
// 27 (0x1b): TypeSpec cRecs: 0 (0), cbRec: 2 (0x2), cbTable: 0 (0)
// col 0: Signature oCol: 0, cbCol: 2, blob
// ...
source share