View Single Post
  #10  
Old 12-09-2009, 11:17 AM
kao kao is offline
Senior Member
 
Join Date: Sep 2007
Posts: 184
Default

PublicKeyToken should be null only if assembly is not signed by strong name key. Are you sure about that? Check the original file, not the one produced by DeSmart.

GetCurrentMethod.MetadataToken is an identifier of the current method, in your case identifier of Class_01.Method_00().

I would use ILDASM and other Microsoft tools for all those tasks. It takes some time to get used to it's output but it's really powerful. It's possible that other tools (for example, Reflector) show method tokens as well, but I'm not sure about that..

Showing strong name token of an assembly (sn.exe is part of Microsoft.NET SDK):
Code:
C:\>sn -T test.exe

Microsoft (R) .NET Framework Strong Name Utility  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

Public key token is 67d0e8149152d3d2
Example ILDASM output from my test assembly:
Code:
.method /*060049B8*/ privatescope hidebysig static void  '3wW1VNpxI$PST060049B8'() cil managed noinlining
So, the token of method '3wW1VNpxI$PST060049B8' is 0x060049B8.
Reply With Quote