Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
What is the purpose of MethodInfo.MetadataToken

What is the token normally used for? More importantly, if I have a MetadataToken, can I get back the MethodInfo object?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The metadata token is something that is part of the CIL specification for how data is organized. It's largely something you never need to care about.

More specifically, the metadata token is a tuple of a table identifier and a resource identifier.

You cannot rely on a metadata token to remain consistent between compiles, so I would not use it to identify a method.

You can use Module.ResolveMethod to convert a metadata token back to a MethodBase. MethodBase is the base type for MethodInfo. If the metadata token is for a method (as opposed to a constructor), then you should be able to cast it to a MethodInfo.

An assembly is made up of one or more modules, but practically an assembly only contains a single module - the C# and VB.NET compilers do not produce multi-module assemblies.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda