Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda