Last active
October 19, 2019 19:10
-
-
Save Legends/6407568cac5425bf1d195aa648422bcb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var path = @"C:\Users\Admin\Documents\Visual Studio 2019\Projects\PuppeteerCSarpTest\bin\Debug\PuppeteerCSarpTest.exe"; | |
| AssemblyName an = AssemblyName.GetAssemblyName(path); | |
| byte[] pt = an.GetPublicKeyToken(); | |
| pt = an.GetPublicKeyToken(); | |
| var length = pt.GetLength(0); | |
| Console.WriteLine("9ad46d957f307217".Length); | |
| for (int i = 0; i < length; i++) | |
| { | |
| Console.Write("{0:x2}", pt[i]); // each byte is two characters, just test with {0:x3}, {0:x4}, etc. to see the diff | |
| } | |
| // Output: | |
| // length = 16 | |
| // converted byte by byte: 9ad46d957f307217 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment